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
DEFINE WHAT COPYRIGHT?
Reika [66]
Copyright is when someone is given the right to print, publish or make a film.
5 0
2 years ago
Read 2 more answers
What paper should I use for technical drawing?
Vitek1552 [10]

Answer:

classic A4 format, and therefore for 210 x 297 mm sheets

7 0
3 years ago
Write a program in Java programming language to display or calculate “Hello, Daddy and Mum”
olganol [36]

Answer:

class Simple{

public static void main(String args[]){

System.out.println("Hello Daddy and Mum);

}

}

Explanation:

First, we create a class, then a method and then give the Integrated Data Environment (IDE) the command to give out an output that says Hello, Daddy and Mum”

8 0
2 years ago
The highlighted items in the webpage are called …………………………………..
seraphim [82]

Answer:

highlighted items in webpage are called links.

5 0
3 years ago
A company sells 12-month subscriptions to popular magazines. During the month of may, the company sells $10,000 in magazines, wh
Korvikt [17]

Good is for aware consumers who value quality of life, fashion, and the environment. The areas of home, fashion, gardening, crafts, travel, health, and beauty are all covered in each issue of Good.

<h3>What journal entry to record the sales not yet earned?</h3>

When a business sells any merchandise to a third party on credit, an entry called a sales credit journal entry is made in the company's sales journal.

There is usually a selection of delectable dishes as well as professional advice on relationships, wellness, and nutrition.

Therefore,  In this instance, the sales account is credited in proportion to the debit to the debtor's account or account receivable account.

Learn more about journal entry here:

brainly.com/question/20421012

#SPJ1

4 0
1 year ago
Other questions:
  • HTTP is made to facilitate which kind of communication?
    11·1 answer
  • What do you do to add a line or circle to your presentation?
    7·2 answers
  • How can I code this in Python with only if-statements? (Only allowed to use the built-in functions int(), float(), and str().)
    8·1 answer
  • An acronym is a word formed by taking the first letters of the words in a phrase and making a word from them. For example, AGH i
    10·1 answer
  • Select what's true about Search Engine Companies. Check All That Apply The information contained in a search engine database is
    12·1 answer
  • In your own words, describe how a network administrator can use the OSI model to isolate a network problem.
    13·1 answer
  • Im getting hit offline can someone help or give me some advice
    6·1 answer
  • I need help fixing this please
    6·2 answers
  • Computer works on the basis of?​
    9·1 answer
  • Write a function called st_dev. st_dev should have one
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!