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
How can we search person in brainly for sending request of friend
pshichka [43]

Answer:

The method what I used thast the person what you would like to add make them make a question then find the question by searching it up or looking in the 'answer questions' category. After that answer the question or just write anny thing in the question. Let your friend comment or interact with the answer them click on there profile and add. If you what them to add you back they will have to go on there profile and then go to there followers and click add back.

(Hope I helped)

3 0
1 year ago
What are the possible sources of the information that defines the functional dependencies that hold among the attributes of a re
valkas [14]

A functional dependency describes a relationship between the attributes of an entity such that the value of one attribute is dependent on the value of some other attribute and is very well affected by it.

There can be various sources of information that define functional dependency. For instance, an attribute age can define the functional dependency with the attribute ID. One cannot include the voter ID if they are not above 18 years of age.

Similarly, the attribute date of joining can define the functional dependency with the attribute experience, as the experience in a particular organization can be calculated by subtracting the joining date fro the current date.

3 0
2 years ago
Computer software licensed under exclusive legal right of the copyright holder with the intent that the licensee is given the ri
Shkiper50 [21]

Answer:

The following statement is 'True'.

Explanation:

There is a software named 'Proprietary software' and also called 'closed-source software', it's non-free software and used to describe the software that is not freely licensed such as operating system, file formats, and system programs. this software is licensed for studying, sharing, modification, redistribution and reverse engineering and has the copyright to use the software under only certain conditions and we can also say that it bears limit against these types of uses.

6 0
3 years ago
Learning in a digital environment is also called [blank] learning.
Dafna1 [17]

Answer:

The blank is online learning

4 0
2 years ago
Read 2 more answers
Consider this binary search tree:______.
Nitella [24]

Answer:

The new root will be 2.

<em></em>

Explanation:

The binary tree is not properly presented (See attachment)

To answer this; first, we need to order the nodes of the tree in a pre-order traversal.

We use pre-order because the question says if something is removed from the left child.

So, the nodes in pre-order form is: 14, 2, 1, 5, 4, 16.

The root of the binary tree is 14 and if 14 is removed, the next is 2.

<em>Hence, the new root will be 2.</em>

7 0
2 years ago
Other questions:
  • To what device, inside the computer, do all other devices connect
    10·2 answers
  • Ethan wants to change the font in his document. He should _____.
    8·2 answers
  • Which loan type requires you to make loan payments while you’re attending school?
    9·1 answer
  • In one to two sentences, explain why citizens pay taxes
    8·1 answer
  • 2 ways to make your computer work faster ( please help asap )
    6·1 answer
  • Anyone know how to delete it in my laptop
    10·1 answer
  • Do you know the energy unit question?
    10·1 answer
  • A nested folder can best be described as what?
    12·1 answer
  • The disk you inserted was not readable by this computer
    11·1 answer
  • Why is it important for organizations to make strong commitment to Cloud at scale?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!