0

How do I store the value after the orginal value has been calculated.

For example I minus 10 from 100, and I want 90 to be stored and in the next calculation another 10 wil be minued from 90 not the 100 which the original.

2
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by josh48
1

How do I store the value after the orginal value has been calculated.

For example I minus 10 from 100, and I want 90 to be stored and in the next calculation another 10 wil be minued from 90 not the 100 which the original.

program sablon;
uses crt;
var a,b,c,d,e,f,g:integer;
begin
     clrscr;
     a:=10;
     b:=100;
     c:=b-a; {90}
     d:=c-a; {80}
     e:=d-a; {70}
     f:=e-a; {60}
     g:=f-a; {50}
     readln;
end.
{created by FlamingClaw 2009}

:D so simple,or not?

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.