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:
Explanation:
1) the versions of JavaScript that are fully supported by all modern browsers ( Except internet explorer 9) are:
C. ECMAScript 3, ECMAScript 5
2) JavaScript is used to implement complex features on a_____
A. web page
3) computer programming tools that are used to store data are called____
C. variables
4) var name = Scott; is the code to create a ____ called "Scott"
D. None of the above
Scott is a variable
5) the key difference between "var" and "let" variables is that____
D. None of the above
let is used to redefine a variable by using var to redefine may cause problems
6) Hoisting in JavaScript is the process whereby declarations get moved to the____
C. top
7) Im JavaScript, "/ /" is used to code____
A. comments
8) ______ data types have two potential values - true and false.
D. None of the above
Boolean is the data type and null is always false
9) Using ____ gives coders the ability to query data set data to create blueprints.
C. consoles
The Console object provides access to the browser's debugging console.
Answer:
A cyber security agent
Explanation:
That will mean protecting organizations from being hacked by other ethical hackers