posted 14 years ago
instead of trying to explain all the different conditions I've tried, maybe there's a much simpler approach to the following situation:
I want to be able to input a unknown number of values, ending the list with the value 999
I then want it to take the difference of each consecutive value.
Finally, output these differences in a list.
Example
Input:
10.5
12.05
13.25
21
7
999
Output:
1.55
1.20
7.75
-14
I do not want the outputs list mixed in the inputs list... I want all the inputs listed first (as they're entered - an unknown number of inputs), the list ending with 999.
Followed by a list of outputs...
Any suggestions?
p.s. the equations and code is simple enough, just the formatting of getting all the inputs first then listing all the outputs is where I'm stuck.