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]
3 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]3 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
What Is What is the difference between system software and application software?<br>​
inna [77]

Answer:

Hope it helps have a nice day..

4 0
2 years ago
10. This famous designer’s sister took over his clothing line after his assassination in 1997.
rewona [7]

Please find the answers in attached file.

Download docx
8 0
3 years ago
What type of object can offer the most effective way to display data and calculations in a presentation?
poizon [28]

This is definitely an opinion, but an excel you can do A and D and just about the same as B also

<u>So i'd say C </u>

8 0
3 years ago
I got a kahoot! Totally random pls join!<br><br> Code 08408519!
OlgaM077 [116]

Answer:

say less

Explanation:

5 0
3 years ago
Read 2 more answers
A museum is evaluating historical documents for authenticity, reviewing their physical condition, and categorizing them by subje
Natasha_Volkova [10]

The part of this process that could the museum automate easily is defining and assigning categories by subject.

<h3>What is Cloud backup?</h3>

Cloud backup is known to be a kind of service where  data and applications on a business's servers are known to be saved up and kept on a remote server.

Note that a lot of Businesses usually back up to their data to cloud so as to keep files and data in space and available when they need it  most especially in the times of a system failure, outage, etc.

Learn more  about museum  from

brainly.com/question/95815

6 0
2 years ago
Other questions:
  • A digital footprint is all of the information on-line about a person posted by that person or others, ____________. intentionall
    14·1 answer
  • What command would you run from a windows command line to test a computer's network stack?
    7·1 answer
  • 4-Translate the following C program to MIPS assembly program (Please explain each instruction in your code by a comment and subm
    6·1 answer
  • Each of these is a step in cEach of these is a step in conflict resolution: Evaluate solutions suggested. Define the problem. De
    7·1 answer
  • Discuss at least 1 Microsoft Windows security features that could protect data?
    5·1 answer
  • Which Backstage view feature helps you to specifically remove customized information from a document? Protect Document Feedback
    14·1 answer
  • Write a program to generate the 1,8,27,64,125,226,343,512,729,1000 series.​
    12·1 answer
  • There are many reasons to convert to the decimal numbering system. Select the best answer. When checking numeric values in compu
    5·2 answers
  • Convert alzebric expression into basic expression<br> (1/2)bh<br> PLEASE GIVE ANSWER FAST
    10·1 answer
  • I need some help-
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!