View Full Version : Variable changing- HELP!
Ok so what I,m trying to do is calculate the difference between the numbers the user puts in. Basically what my program is supposed to do is allow the users to enter numbers, and then when they do not want to add more numbers, the program is supposed to find the difference between the highest and lowest number. Any ideas on how to do this are appreciated!
This is what i have now:
x2495iiii
10-17-2009, 03:09 AM
Sorting numbers properly is actually a fairly complex subject. I've written an example of the sorting method called Bubblesort, which is the slowest and simplest sorting method.
It'll ask if you want another number. Click yes to add one, click no to activate the sorting method (I recommend only about 5 numbers, as more may make the 3d text go off screen).
The first text displayed will show the unsorted list. The second one will show the sorted list, and the last one will show the difference between the highest and lowest numbers.