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.
This question is incomplete. The complete question is given below:
Your company has just brought a new 22-core processor, and you have been tasked with optimizing your software for this processor. You will run four applications on this system, but the resource requirements are not equal. Assume the system and application characteristics listed in table 1.1
Table 1.1 Four Applications
Application
A
B
C
D
% resources needed
41
27
18
14
% parallelizable
50
80
60
90
The percentage of resources of assuming they are all run in serial. Assume that when you parallelize a portion of the program by X, the speedup for that portion is X.
a. How much speedup would result from running application A on the entire 22-core processor, as compared to running it serially?
Answer:
Speedup = 50
Explanation:
- The speedup for that portion is x if we parallelize a portion of that program by X.
- If the whole program has no parallelize portion or in other words the whole program is running serially then the speedup will be zero.
- So in this scenario if parallelizable portion of A is 50% so according to above description the speedup is 50.
This is true
We can simply put media convergence as the merging of previously distinct media technologies into one core technology or ecosystem. All it takes is separate ideas being smashed together to form one big idea. An example of media convergence is a smartphone. The smartphone is the technological convergence of communication. It can be used to communicate while functioning as a computer on which we share and view content. Before, this could have taken several devices to accomplish the above task individually.
Answer:
bro this is long try something easy
Explanation:
im lazy to read