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
An expression which combines variables numbers and at least one operation
hichkok12 [17]

Answer:

An "Algebraic expression" is the correct answer for the above question.

Explanation:

  • The algebraic expression is an expression that is written in the form of alphabets and numbers. For example x+2x.
  • And it is also calculated with the consideration of alphabets like X+2X will be 3X.
  • The above question asked about the expression which is used with the combination of alphabets or variables and the numbers. That expression is known as "Algebraic expression"
4 0
3 years ago
So, I have an Cru__ on this boy in school and his name is Bray but Yeah.............Can someone help me
tester [92]

Explanation:

Okay so, am not a great person at that but my best advice would be. to be yourself. you can always be honest and talk to him privately that you have a crush on him. Dont be afraid and if he doesn't go to well dont feel bad, at least you had the guts to tell him. other girls would be scared.

4 0
3 years ago
Read 2 more answers
Help me please! (*18* points!)
miss Akunina [59]

Answer:

Databars and Sparkliness are key types of conditional formatting in excel.

Explanation:

Databars show the relative magnitude of values in a dataset. Sparkliness are tiny charts that reside in a cell in excel. These charts are used to show the trend over the time or variation in the dataset.

3 0
3 years ago
Consider the following code:
ICE Princess25 [194]

Answer: 3

Explanation:

Because X = 18 and our condition given to the code if > and < which do not match with the input so it prints 3.

4 0
3 years ago
HELP ASAP, AND YES I KNOW, WRONG CATEGORY. SORRY!
Anastasy [175]

Answer:

A. ensemble.

Explanation:

A musical ensemble can be defined as a group of people who play instrumental and vocal music. It is also known as a music group and carries a distinct name. The word ensemble is derived from the Middle French ensemblée, meaning together at the same time.

A rock band will come under the category of a musical ensemble as it is also a group of people performing instrumental music or vocal music.

Therefore, option A is correct.

3 0
3 years ago
Other questions:
  • How might writing an online journal be different than writing in a paper one ​
    15·2 answers
  • Write a function that, given an array A of N integers, of which represents loads caused by successive processes, the function sh
    15·1 answer
  • The Apple iPhone was a revolutionary product when it was introduced in 2007. To what extent do you agree or disagree with this s
    8·1 answer
  • What is a good safety precaution to take when opening a computer case?
    9·1 answer
  • Is there a way to earn free robux
    7·2 answers
  • What component of a processor holds instructions waiting to be processed by the alu?
    11·1 answer
  • Siapa mahapatih brainly.com atau yg disebut Brainly Amerika Serikat ?​
    5·1 answer
  • Select the three reasons that the gaming industry is set to grow.
    12·2 answers
  • The objective of this task is to use Scapy to estimate the distance, in terms of number of routers, between your VM and a select
    7·2 answers
  • Discuss new concepts that you have learned about Cisco Devices and how they will be helpful in the workplace.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!