![subject](/tpl/images/cats/informatica.png)
Computers and Technology, 02.03.2020 17:47 darianhaynes
"Simon Says" is a memory game where "Simon" outputs a sequence of 10 characters (R, G, B, Y) and the user must repeat the sequence. Create a for loop that compares the two strings starting from index 0. For each match, add one point to userScore. Upon a mismatch, exit the loop using a break statement. Assume simonPattern and userPattern are always the same length. Ex: The following patterns yield a userScore of 4:
simonPattern: RRGBRYYBGY
userPattern: RRGBBRYBGY
public class SimonSays {
public static void main (String [] args) {
Scanner scnr = new Scanner(System. in);
String simonPattern;
String userPattern;
int userScore;
int i;
userScore = 0;
simonPattern = scnr. next();
userPattern = scnr. next();
/* Your solution goes here */
System. out. println("userScore: " + userScore);
return;
}
}
![ansver](/tpl/images/cats/User.png)
Answers: 2
Another question on Computers and Technology
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 11:00
in 2007, floridians died in alcohol-related collisions.a. 501b. 1,051c. 5,015d. 10,839
Answers: 1
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 14:30
Choose the answers that best complete each sentence. on average,are more expensive than other kinds of postsecondary schools. the cost of room and board includes. to save money, some students attend auniversity in their home state.
Answers: 2
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 19:30
Amitha writes up a one-page summary of a novel during her summer internship at a publishing company. when she reads over the page, she realizes she used the word “foreshadow” seven times, and she would like to reduce the repetition. which tool would best amitha solve this problem?
Answers: 3
![question](/tpl/images/cats/informatica.png)
You know the right answer?
"Simon Says" is a memory game where "Simon" outputs a sequence of 10 characters (R, G, B, Y) and the...
Questions
![question](/tpl/images/cats/ap.png)
Advanced Placement (AP), 05.10.2019 20:00
![question](/tpl/images/cats/mkx.png)
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/biologiya.png)
Biology, 05.10.2019 20:00
![question](/tpl/images/cats/biologiya.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 05.10.2019 20:00
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 05.10.2019 20:00
![question](/tpl/images/cats/biologiya.png)
Biology, 05.10.2019 20:00
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/geografiya.png)
![question](/tpl/images/cats/fizika.png)
![question](/tpl/images/cats/fizika.png)
![question](/tpl/images/cats/istoriya.png)
History, 05.10.2019 20:00
![question](/tpl/images/cats/ekonomika.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 05.10.2019 20:00
![question](/tpl/images/cats/himiya.png)