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
give an example of a technical issue you were not able to resolve on your first attempt. What troubleshooting steps did you take
erastovalidia [21]
One technical issue I had was on Windows 8.1, with the charm menu not working. The troubleshooting steps to fix it was I did CTRL+SHIFT+ESC to open task manager. I then found Windows Explorer and clicked "Reload." Then everything was fine.

Hope This Helped!
6 0
3 years ago
How do programmers recognise patterns, generalise and abstract information
Dima020 [189]

Answer:

Pattern recognition is the process of recognizing patterns by using machine learning algorithm. ... In a typical pattern recognition application, the raw data is processed and converted into a form that is amenable for a machine to use. Pattern recognition involves classification and cluster of patterns

Explanation:

4 0
2 years ago
What is another name for mesolithic age
Romashka-Z-Leto [24]
In archaeology, mesolithic is culture between paleolithic and neolithic. The term "Epipaleolithic" is often used for areas outside northern Europe, but was also the preferred synonym used by French archaeologists until the 1960s.
7 0
2 years ago
Read 2 more answers
Intellectual property rights are exclusive rights that help protect both the created and the creation. IPR offers exclusively wh
dedylja [7]
IPR offers ownership of the intellectual property. The owner of the property has the right to a monetary gain from those who wish to use it.
8 0
2 years ago
Read 2 more answers
A virtual meeting is the same thing as a/an A. online meeting. B. VoIP. C. seminar. D. convention.
Kryger [21]
I believe it's A. online meeting
5 0
3 years ago
Other questions:
  • When you use the ip address of the web server, the correct site is displayed?
    15·1 answer
  • Data warehousing and data mining mean the same thing when applied to CRM
    7·2 answers
  • Explain the term remote backup with examples.​
    5·1 answer
  • Oxygen-18 has an atomic number of 8. How many neutrons are in this isotope?
    7·1 answer
  • The Linux operating system was created by which software engineer?
    15·1 answer
  • If the predetermined overhead allocation rate is 245% of direct labor cost, and the Baking Department's direct labor cost for th
    13·1 answer
  • Voice authentication requires speech to text capability Facial recognition may be used for authentication The human iris is uniq
    6·1 answer
  • ou use productivity apps on your iPad tablet device while traveling between client sites. You're concerned that you may lose you
    11·1 answer
  • Write modified code that will generate a random number between 0 and 255 when a button is pressed and will write the number to t
    14·1 answer
  • Blockchain is often associated with Bitcoin and the financial services industry. However, it is applicable to almost every indus
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!