Question: Write a do/while loop that repeatedly prints a certain message until the user tells the program to stop. The do/while is appropriate because the message

Write a do/while loop that repeatedly prints a certain message until the user tells the program to stop. The do/while is appropriate because the message should always be printed at least one time, even if the user types n after the first message appears. The message to be printed is as follows:

She sells seashells by the seashore.

Do you want to hear it again? y

She sells seashells by the seashore.

Do you want to hear it again? y

She sells seashells by the seashore.

Do you want to hear it again? n

Step by Step Solution

3.42 Rating (161 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

dowhile loop that repeatedly prints a certain message until ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Building Java Programs A Back to Basics Approach Questions!