Ask Question
13 May, 09:01

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).

+2
Answers (1)
  1. 13 May, 10:42
    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?
Get 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 there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers