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;
}
Answers: 1
Computers and Technology, 21.06.2019 20:40
Peripherals are part of the main computer. true false
Answers: 3
Computers and Technology, 23.06.2019 04:00
Laire writes a letter to her grandmother, in which she describes an amusement park she visited last week. she adds pictures of that place in her letter. which feature of a word processing program will claire to remove unwanted parts of the pictures?
Answers: 3
Computers and Technology, 23.06.2019 04:31
Type the correct answer in the box. spell all words correctly. the managing director of a company sends a christmas greeting to all his employees through the company email. which type of network does he use? he uses an
Answers: 1
Computers and Technology, 23.06.2019 12:40
According to the video what are some tasks petroleum engineers perform check all that apply
Answers: 2
SOLVE IN C: "Simon Says" is a memory game where "Simon" outputs a sequence of 10 characters (R, G, B...
Mathematics, 19.05.2021 20:00
Chemistry, 19.05.2021 20:00
Mathematics, 19.05.2021 20:00
Chemistry, 19.05.2021 20:00
History, 19.05.2021 20:00
Mathematics, 19.05.2021 20:00
Mathematics, 19.05.2021 20:00
Mathematics, 19.05.2021 20:00
Spanish, 19.05.2021 20:00
Mathematics, 19.05.2021 20:00
Physics, 19.05.2021 20:00
Mathematics, 19.05.2021 20:00
Health, 19.05.2021 20:00