![Computers and Technology](/tpl/images/cats/informatica.png)
Computers and Technology, 25.02.2020 20:54, ilovebeanieboos
SOLVE IN C: "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
please use comments to explain each step!! I would like to understand the process :)
#include
#include
int main(void) {
char simonPattern[50];
char userPattern[50];
int userScore;
int i;
userScore = 0;
scanf("%s", simonPattern);
scanf("%s", userPattern);
**YOUR ANSWER GOES HERE**
printf("userScore: %d\n", userScore);
return 0;
}
![answer](/tpl/images/cats/otvet.png)
Answers: 1
Other questions on the subject: Computers and Technology
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 04:31, hargunk329
Q13 what function does a security certificate perform? a. creates user accounts b. scrambles data c. identifies users d. creates password policies e. provides file access
Answers: 1
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 15:00, hunteryolanda82
Based on the current economic situation do you expect the employment demand for graduating engineers to increase or decrease? explain the basis for your answer. with a significant economic recovery, what do you think will happen to future enrollments in graduating engineering programs?
Answers: 1
![image](/tpl/images/cats/informatica.png)
Do you know the correct answer?
SOLVE IN C: "Simon Says" is a memory game where "Simon" outputs a sequence of 10 characters (R, G, B...
Questions in other subjects:
![Konu](/tpl/images/cats/mat.png)
Mathematics, 22.05.2020 20:57
![Konu](/tpl/images/cats/mat.png)
![Konu](/tpl/images/cats/mat.png)
![Konu](/tpl/images/cats/mat.png)
![Konu](/tpl/images/cats/mat.png)
Mathematics, 22.05.2020 20:57
![Konu](/tpl/images/cats/mat.png)
Mathematics, 22.05.2020 20:57
![Konu](/tpl/images/cats/en.png)
![Konu](/tpl/images/cats/mat.png)
Mathematics, 22.05.2020 20:57
![Konu](/tpl/images/cats/mat.png)
![Konu](/tpl/images/cats/fizika.png)
Physics, 22.05.2020 20:57