Answer:
#include <stdio.h>
#include <string.h>
int main(void) {
char simonPattern[50];
char userPattern[50];
int userScore;
int i;
userScore = 0;
scanf("%s", simonPattern);
scanf("%s", userPattern);
for(i = 0;simonPattern[i]!='\0';i++){
if(simonPattern[i]!=userPattern[i]){
userScore=i;
break;
}
}
printf("userScore: %d\n", userScore);
return 0;
}
Explanation:
- Use a for loop that runs until it does not reach the end of simonPattern.
- Check whether the current index of simonPattern and userPattern are not equal and then assign the value of i variable to the userScore variable and break out of the loop.
- Finally display the user score.
Why are you asking other people to answer a question about something that's affected <u>you?</u>
Answer:
Employers are allowed to check the number of keystrokes that word processors enter during the day.
Explanation:
An employer is authorized to monitor the activity of its employee when:
- The employee authorizes it.
- The employer owns the system to be used.
- Surveillance is necessary for a strictly professional purpose.
By analyzing the keys pressed per day, the employer can determine the performance provided by its employees, and if they use the company's resources, for non-work purposes.