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
Who do u play as in sister location
seropon [69]
Well, it really depends on who you believe, because i have a lot of friends who say it is Purple Guy, but i have others that say you just play as an unknown character. So, i would go with Purple Guy, but I'm only like 85 percent sure.
5 0
3 years ago
Read 2 more answers
What is the most widely used operating system for mobile devices?
Alekssandra [29.7K]
Android, many phone brands use the Android OS. Unlike Apple, which is the only technology company with IOS.
8 0
3 years ago
Choose the output result of the below code.
SIZIF [17.4K]

Answer:

B

Explanation:

When you initialize an instance of FunEvent(tags, year) and assign it to bc. The instance variables in this case are: self.tags = ["g", "ml"] and self.year = 2022. But then you alter tags, which will also change self.tags, since self.tags is a reference to the list you passed in as an argument. This is not the case when you do year=2023 because, first of all, integers are not mutable, and also because even if somehow integers were mutable, you're not changing the object in-place, you're simply changing the where the "variable" is pointing to. So for example if you did tags = ["g", "ml", "bc"] instead of tags.append("bc"), it would also not change the value of the instance variable "tags", because you wouldn't be changing the object in-place. So when you print(bc), the instance variables will be ["g", "ml", "bc"] and 2022. When you try to print an object, it call try to convert it into a string using the __str__  magic method. In this case it will return a string formatted as "Event(tags={self.tags}, year={self.year}) which will output "Event(tags=['g', 'ml', 'bc'], year=2022)" So the correct answer is B

4 0
2 years ago
((Excel)) please help, 100 points, and brain crown thingy, not only that, i will make several of these so you can get several hu
cupoosta [38]

Answer:

First you read the question and numbers, then you use the numbers in the correct way and you try reallllyyy hard, you will find your answer! Hope this helps! :D

4 0
2 years ago
Solve for x<br><br>4d+3/8=-2​
Alexxx [7]

Answer:

-19/32

Explanation:

(If I assume d to be x)

4x+3/8=-2

or,4x=-2-3/8=-19/8

or,x=(-19/8)*(1/4)=-19/32

5 0
2 years ago
Other questions:
  • A method in a class that modifies information about an object is called a/an ____ method.
    14·1 answer
  • Learning about public speaking can help improve your ________________.
    15·1 answer
  • In your opinion, is it more beneficial to have many folders or is it better to “nest” subfolders? Explain your response.
    10·2 answers
  • All of the following are ways to improve the mobile experience for a website visitor EXCEPT:
    8·1 answer
  • The part of the computer that provides access to the internet is the-?
    15·2 answers
  • A media strategy that involves high ________ most likely involve creating broad exposure using many media vehicles, while a stra
    15·1 answer
  • Which of the following Web sites would be MOST credible?
    6·1 answer
  • You can find synonyms and disciplinary jargon in the ______, _______, and ______ in your search results. You can then use these
    13·1 answer
  • Who wont me???????????????
    6·2 answers
  • Select one Layer 2 or wireless WAN technology presented in Lesson 3. Elaborate on its characteristics, pros and cons, and common
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!