subject

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:
Ex: The following patterns yield a userScore of 9:
simonPattern: RRGBRYYBGY
userPattern: RRGBBRYBGY
Result: Can't get test 2 to occur when userScore is 9
Testing: RRGBRYYBGY/RRGBBRYBGY
Your value: 4
Testing: /Y
Expected value: 9
Your value: 4
Tests aborted.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 00:20
The pyraminx is a rubik's cube-type toy in the shape of a tetrahedron (not a pyramid). the pyraminx shown below has edges 15\,\text{cm}15cm15, space, c, m long and vertical height h=12.2\,\text{cm}h=12.2cmh, equals, 12, point, 2, space, c, m. the triangle drawn with dashed lines is a right triangle. what is the distance rrr? round your answer to the nearest tenth.
Answers: 1
question
Computers and Technology, 22.06.2019 02:00
Aletter or menu command that starts an action when the user presses the designated letter and the alt key together is called what?
Answers: 1
question
Computers and Technology, 22.06.2019 11:40
Design a pos circuit that displays the letters a through j on a seven-segment indicator. the circuit has four inputs w, x, y, and z which represent the last 4 bits of the uppercase ascii code for the letter to be displayed. thus, if wxyz = 0001 then "a" will be displayed. (any answer with 22 or fewer gates and inverters, not counting any for the inputs, is acceptable)
Answers: 2
question
Computers and Technology, 22.06.2019 18:30
Kto rozmawia z clamentain przez krótkofalówke w the walking dead w 4 epizodzie
Answers: 1
You know the right answer?
C++ "Simon Says" is a memory game where "Simon" outputs a sequence of 10 characters (R, G, B, Y) and...
Questions
question
Physics, 03.05.2021 22:50
question
Mathematics, 03.05.2021 22:50
question
English, 03.05.2021 22:50
question
History, 03.05.2021 22:50
question
English, 03.05.2021 22:50
question
Mathematics, 03.05.2021 22:50
Questions on the website: 13722363