1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Zina [86]
3 years ago
10

SOLVE IN C:

Computers and Technology
1 answer:
RSB [31]3 years ago
4 0

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.
You might be interested in
What are some of the issues that organizations need to be aware of when designing and managing data?
tensa zangetsu [6.8K]

Answer and Explanation:

There are two primary issues.  

The principal issues is Security of data or information.

The information must be overseen such that it is upheld up regularly and kept secure from any catastrophic event or outer hacking.  

Second, when planning a framework to oversee information, we have to make it versatile and adaptable.

The data should be scalable , i.e., the component used to store the information must be effectively ready to develop as we collect more information or the sort of information contribution to the framework needs to change after some time.

7 0
3 years ago
A program runs from start to finish, producing unexpected results, though no error message is received. What most likely occurre
adelina 88 [10]

Answer:

The answer is most likely B

Explanation:

If it is a logic error, then the computer thinks it is doing the correct task.

8 0
3 years ago
Can some one help sorry I just so confused on this and I keep failing it I just need the help So choose the best answers
statuscvo [17]

Answer:

i7tyerged

Explanation:

7 0
3 years ago
Clara works behind a computer all day. She gets a lot of headaches, and her eyes have been hurting her lately. Her doctor diagno
Vinil7 [7]

Answer:

Clara should use computer lenses and artifical tears.

The computer lenses help block blue light from entering your eyes which would help with the headaches and help you focus on something further away. The artificial tears help lubricate dry eyes which prevents or in Clara's case, reduces/relieves eye strain.

8 0
2 years ago
If you want to conserve ink or toner, you can instruct powerpoint to print ____ documents.
11Alexandr11 [23.1K]
The answer is B) draft quality
8 0
3 years ago
Other questions:
  • Writers should avoid jargon because jargon ______. a. Takes too long to use b. Limits what ideas can be explored c. Conveys too
    12·1 answer
  • The mods have peanuts for brains (it's true, I lost like 1k points to them for no reason)
    12·1 answer
  • Print a countdown from n to 1 The function below takes one parameter: an integer (begin). Complete the function so that it print
    8·1 answer
  • . An access specifier is one of three keywords:
    14·1 answer
  • Consider the following statement from the CS Principles course framework: The global distribution of computing resources raises
    12·1 answer
  • Write two example use of relationships ICT
    11·1 answer
  • What was that show where lowe’s were based off eye colors and the main character had orange eyes that let her mind control peopl
    14·2 answers
  • One of the benefits of holding an investment for over a year rather than selling it in less than a year is that the
    14·2 answers
  • How do you convert an algorithm to make it possible for a computer to read
    6·1 answer
  • Software is in -----language​
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!