Ask Question
12 March, 22:13

Write a loop that asks the user "do you want to repeat the program or quit? (r/q) ". the loop should repeat until the user has entered an r or q (either uppercase or lowercase).

+5
Answers (1)
  1. 12 March, 22:18
    0
    Here is the loop:for (int i = 0; i < S. length (); i++) S. charAt (i) = = 'q'); System. out. println (""do you want to repeat the program or quit? (r/q) "");

    If the user enter any of the characters in the if statement the user will be asked by the question.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Write a loop that asks the user "do you want to repeat the program or quit? (r/q) ". the loop should repeat until the user has entered an r ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers