Matt Seymour
Updating variables in a loop? and only printing certain messages after the first iteration?!
0 Answer(s)      5 years and 11 months ago
Posted in : Java Beginners

I've written a program that reads two values. I then want it to repeatedly read a further two values until someone enters 0.

The reason why I want to do this is so I can use it to work out some calculations and ratios. So effectively at every calculation except the first, I would be printing out the results and the ratio of the newly computed data to the previously computed data.

But I'm really confused on how I would go about this, such as how variables update in the loop to be compared to the previous etc


View Answers

Related Tutorials/Questions & Answers: