Respuesta :

Here is the loop:for (int i = 0; i < S.length(); i++) {    if (S.charAt(i) == 'R' || S.charAt(i) == 'r' || S.charAt(i) == 'Q' || 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.