Home Answers Viewqa Java-Beginners Updating variables in a loop? and only printing certain messages after the first iteration?!

 
 


Matt Seymour
Updating variables in a loop? and only printing certain messages after the first iteration?!
0 Answer(s)      2 years and 6 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 Pages:

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.