Ask Question
26 December, 17:59

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. 26 December, 19:37
    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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers