Re: TIB: += function in TI Basic?


[Prev][Next][Index][Thread]

Re: TIB: += function in TI Basic?



In a message dated 97-09-24 17:43:17 EDT, you write:

<< 
 >The best and easiest way to do that i Ti-Basic is to use the 'For('
 >command.
 >
 >the syntax is
 >For(variable,start,end,increment)
 >
 >To accomlish what you want set 'start' to zero, call 'variable'
 >'total', and make 'increment' 'i'.
 >then use 'end' how you wish.
 
 Rick,
 
 That's not what I'm trying to do... basically, the program looks something
 like this at the moment [I don't have it in front of me at the moment]
 
 :Input "Number of isotopes=",A
 :For(x,1,A,1)
 :Input "Percent=",B
 :Input "Mass=",C
 :D=(Be-2*C)
 :End
 
 What I would like to do is have a running total of D, within the loop --
 does TI Basic support nested loops? >>

Try this and see if it does what you want it to

:Input "Number of isotopes=",A
 :For(x,1,A,1)
 :Input "Percent=",B
 :Input "Mass=",C
 :(B-2*C)->D
 :D+1->D
 :End
 :Disp D-1