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]
2 years ago
10

SOLVE IN C:

Computers and Technology
1 answer:
RSB [31]2 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 might happen if you haven't decided on a course of action when you're within 4-6 seconds of the intersection?
Delicious77 [7]
You Could Cause An Accident To Happen.
7 0
3 years ago
61:39 A communication sent through Transmission Control Protocol (TCP) arrives out of order. What allows the data to be put back
kobusy [5.1K]

Answer:

Sequence Numbers

Explanation:

In the transmission control protocol, the sequence number are used to put data back in order.

It is the number pattern that follows sequence. This is the number pattern which interprets data before they are returned by the recipient as an acknowledgement with its numbers.

When a sent data is out of order, the sequence number works towards correcting the sequence before sending its acknowledgement.

7 0
2 years ago
The political spectrum spans from Communism on the extreme left to __________ on the extreme right. /8178757/1f6bdbf3?utm_source
Delvig [45]
If the options are: <span><span><span>A.Socialism, </span><span>B.Liberalism, </span><span>C.Anarchism, </span>D.Conservatism, then the answer is D. Conservatism. I can see that some people have previously answered Anarchism. But it can't be the right answer because anarchism does not advocate either leftist or rightist politics - it advocates stateless politics. On the other hand, both left-wing and right-wing politics operate within the conventional field of states and governments. Now, communism is the extreme leftist position of egalitarianism, that is social equality, without private property. On the other hand, conservatism advocates social hierarchies and inequality as a natural order of society. Liberalism isn't the answer either because it isn't a rightist political option.</span></span>
6 0
3 years ago
Read 2 more answers
How to find radius of the base examples ​
Mademuasel [1]

Answer:radius is half the diameter

Explanation:

3 0
2 years ago
Disabling cookies prevents you from being the victim of a virus <br> A.True B.False
wariber [46]

The correct answer is True

3 0
3 years ago
Read 2 more answers
Other questions:
  • What three steps Name a group??
    14·1 answer
  • can An intelligent workplace uses technology to allow workers to be productive whether they are in the office or working from ho
    12·1 answer
  • Technically
    12·1 answer
  • Write a function called convert_format which converts the format of a date from mm/dd/yyyy to month name dd, yyyy.
    12·1 answer
  • What does ;-; mean during a text?
    8·2 answers
  • When creating a chart or graph, which should be completed first?
    9·2 answers
  • Importancia de la química en la vida cotidiana​
    15·1 answer
  • Create a function, return type: char parameters: int *, int * Inside the function, ask for two integers. Set the user responses
    11·1 answer
  • 17. Write a SELECT query for the palateE4 database that produces a result grid listing paintName, and a count of the occurrences
    12·1 answer
  • Kelly wants to change the text in a cell so that it is centered instead of left-aligned, where should she look to make this
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!