LOL123 @ Mon Mar 22, 2010 3:22 pm wrote:
When the program is run it doesnt go down to zero it only does the calculations once? would I need to use a loop to make it keep repeating?
Have you traced the program to notice that you aren't telling it to repeat any instructions and thus it doesn't repeat anything?
Yes, a loop is a common way to make a program repeat, though not the only way as you could do recursive calls for another way to resolve the problem if you want a different approach.