int main() {
string simon_Pattern;
string user_Pattern;
int userScore;
int i;
user_Score = 0;
simon_Pattern = "RRGBRYYBGY";
user_Pattern = "RRGBBRYBGY";
for (i = 0; i <= simson_pattern.length; i++) {
if (simon_Pattern[i] == user_Pattern[i]) {
user_Score = user_Score + 1;
} else {
break;
}
}
cout << "userScore: " << user_Score << endl;
return 0;
}
Here it uses two string variable to store “simson’s pattern and user’s pattern”. Then a “for loop” is executed till the end of the string. Inside the for loop both the strings are compared character by character and when found the score is added. If not for loop is exited and finally the score is displayed.
Answer:
Elevates rights to what you can access
Use a word processor like Microsoft word or notepad.
Answer: Option D.
<u>Explanation:</u>
When ever we are reading something, if we try to express that in our own words and thoughts, it adds to our power of processing the information. It also increases our vocabulary.
For writing our own thoughts about the information that we are reading, we can make use of the word processor like Microsoft word which provides us with the space to express our thoughts and write what we want to.