Zebra0.com

javaEnding a total loop by asking if there are more

Ending a total loop by asking if there are more

In this program there are no values that are outside the valid data. We must ask each time if there are more values.

Notice that we check if the answer is either 'Y' or 'y'. We do not use and because no character can be both 'y' AND 'Y'.