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
UkoKoshka [18]
2 years ago
9

Prompt the user for an automobile service. Each service type is composed of two strings. Output the user's input. (1 pt) Ex: Ent

er desired auto service: Oil change You entered: Oil change (2) Output the price of the requested service. (4 pts) Ex: Enter desired auto service: Oil change You entered: Oil change Cost of oil change: $35 The program should support the following services: Oil change -- $35 Tire rotation -- $19 Car wash -- $7 If the user enters a service that is not listed above, then output the following error message: Error: Requested service is not recognized
Computers and Technology
1 answer:
Svet_ta [14]2 years ago
8 0

Answer:

Required code is given below.

Best Regards,

Please ask if any queries.

Explanation:

#include <stdio.h>

#include <string.h>

int main(void)

{

  char input[100];

  printf("Enter desired auto service:\n");

  scanf ("%[^\n]%*c", input);

  printf("You entered: %s\n",input);

  if(strcmp(input,"Oil change") == 0){

     printf("Cost of oil change: $35\n");

  }

  else if(strcmp(input,"Tire rotation") == 0){

     printf("Cost of tire rotation: $19\n");

  }

  else if(strcmp(input,"Car wash") == 0){

     printf("Cost of car wash: $7\n");

  }

  else{

      printf("Error: Requested service is not recognized\n");

  }

   

  return 0;

}

You might be interested in
Sets of rules that a computer uses to solve problems?
jonny [76]

Protocal

I need to make this 20 charaters so ye

8 0
3 years ago
Read 2 more answers
Suppose there are two ISPs providing WiFi service in a café. Each ISP operates its own AP and has its own IP address block. If b
Alinara [238K]

Answer:

As a design rule, access points within range of each other should be set to channel frequencies with minimal signal overlap. Users will find that roaming doesn’t work well, and performance will degrade because of interference between access points.

Explanation:

8 0
3 years ago
At one college, the tuition for a full-time student is $6,000 per semester. It has been announced that the tuition will increase
xxMikexx [17]

Answer:grhgrt

Explanation:

4 0
2 years ago
There are four ways to create a macro? FALSE OR TRUE
Murljashka [212]

Answer: True

Explanation:

There are actually four ways to create a macro. You would want to use %let.

7 0
2 years ago
Read 2 more answers
Лемма деген не<br> конспект
xxMikexx [17]

huh? ano daw? kfjfdkvdddddddddddddddd

4 0
2 years ago
Other questions:
  • How can E-Commerce Portals ensure Security of online Transactions by Customers?
    10·1 answer
  • Which of the following rules should be used to keep the appropriate distance between your vehicle and the vehicle in front of yo
    10·2 answers
  • The speed of sound depends on the material the sound is passing through. Below is the approximate speed of sound (in feet per se
    9·1 answer
  • _____ is a systems development technique that produces a graphical representation of a concept or process that systems developer
    11·1 answer
  • What is the "online disinhibition effect"?​
    7·1 answer
  • How do hardware and software work together to allow a user to perform a function?
    7·2 answers
  • What could have made you redesign your plan? Select 3 options.
    6·1 answer
  • Identify the hardware components in your own computer. If you don't have a computer, use a friend's, or one at work or in an NVC
    5·1 answer
  • Which statement is true about hacking?
    11·2 answers
  • Types of Computer games​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!