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
Video-sharing sites such as youtube and vimeo provide a place to post short videos called clips, true or false?
yaroslaw [1]
<span>It is true that video-sharing sites such as Youtube and Vimeo provide a place to post short videos called clips. Nowadays, these videos aren't only short, because even full-length movies can be posted on Youtube. This platform has become an important place for contemporary creators given that it provides them with a location and money to share their creative thoughts with the world. Youtube is becoming more and more important today, which is obvious if you take a look at the number of visitors each month and the money that Youtube earns from its creators.</span>
4 0
4 years ago
What is the foundational domain for business
mr Goodwill [35]

a fundamental domain or fundamental region is a subset of the space which contains exactly one point from each of these orbits . It serves as a geometric realisation for the abstract set of representatives of the orbits . There are many ways to choose a fundamental domain .

hope this help

7 0
3 years ago
Adjectives to describe programming skills
Ronch [10]

Answer:

Here are some adjectives for programmer: archetypal `real, ultimate navigational, former lucid, one-year-old professional, year-old professional, media-friendly genetic, inevitable seven-year, >gical, adgical, ever silent and phlegmatical, silent and phlegmatical, ]real, extremely defensive, and brilliant cryptographic.

8 0
3 years ago
Does speedtest report megabytes per second or megabits
Lesechka [4]

that could be both *shrugging*

7 0
3 years ago
George wants to pursue a career in web technology as a web developer. Which certifications can help him as a web developer?
skelet666 [1.2K]

Answer:Google Analytics IQ.

he can use this

Explanation:

3 0
3 years ago
Other questions:
  • The blank one is a close up of what logo?
    15·1 answer
  • Conformity is the acceptance of culturally approved goals and the means for achieving these goals.
    6·2 answers
  • Which type of element is , and what is the meaning of that element?
    14·1 answer
  • Given two 3x3 arrays of integer, x1 and x2, write the code needed to copy every value from x1 to its corresponding element in x2
    6·1 answer
  • Please help me. i will mark you brailiest
    6·1 answer
  • MORE FREEE POINTS AYEEE
    7·2 answers
  • A list is sorted by selecting the largest element in the list and swapping it with the last one. This technique is called ______
    7·1 answer
  • HELP PLZZZZZZ
    10·1 answer
  • Examples of structures that can store homogeneous data element​
    14·1 answer
  • All variables are----------------------------------------------- help please
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!