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
Alchen [17]
3 years ago
14

Write an application for Cody’s Car Care Shop that shows a user a list of available services: oil change, tire rotation, battery

check, or brake inspection. Allow the user to enter a string that corresponds to one of the options, and display the option and its price as $25, $22, $15, or $5, accordingly. Display Invalid Entry if the user enters an invalid item.
Computers and Technology
1 answer:
Firdavs [7]3 years ago
3 0

An application for Cody’s Car Care:

#include <iostream>

#include <string>

#include <vector>

using namespace std;

int main()

{

vector<string>stroptions(4);

stroptions[0] = "Oil Change";

stroptions[1] = "Tire Rotation";

stroptions[2] = "Battery Check";

stroptions[3] = "Brake Inspection";

 

vector<int> intprices(4);

intprices[0] = 45;

intprices[1] = 22;

intprices[2] = 15;

intprices[3] = 10;

 

int option;

cout<< "Welcome to Joe's Car Care Shop!" <<endl;

cout<< "Choose a service from our menu:" <<endl;

for(int i = 1; i<= 4; i++)

{

  cout<< "#" <<i<< ": " <<stroptions[i-1] <<endl;

}

cout<< "Choice: ";

bool loop = true;

while(loop)

{

  loop = false;

  cin>> option;

 switch(option)

  {

   case 1:

     cout<< "\nA " <<stroptions[option-1] << " will be: $" <<intprices[option -1] <<endl;

     break;

   case 2:  

     cout<< "\nA " <<stroptions[option -1] << " will be: $" <<intprices[option -1] <<endl;

     break;

   case 3:

     cout<< "\nA " <<stroptions[option -1] << " will be: $" <<intprices[option -1] <<endl;

     break;

   case 4:

     cout<< "\nA " <<stroptions[option -1] <<" will be: $" << intprices[option -1] <<endl;

      break;

    default:

     cout<< "\nYou entered an invalid item! Try again!" <<endl;

     loop = true;

     break;

 }

}

}

You might be interested in
Write a python program that takes two lists as input from the user, multiplies the index wise elements of the two lists and adds
nevsk [136]

Answer:

list_one=[]

list_two=[]

list_three=[]

str1=input("list_one:")

for i in str1:

   if i.isdigit():

       i=int(i)

       list_one.append(i)

   elif i.isalpha():

       list_one.append(i)

str2=input("list_two:")

for i in str2:

   if i.isdigit():

       i=int(i)

       list_two.append(i)

   elif i.isalpha():

       list_two.append(i)

print(list_one)

print(list_two)

if len(list_one)==len(list_two):

   for i in range(len(list_one)):

       multiply=list_one[i]*list_two[i]

       add=str(multiply)

       list_three.append(add)

else:

   print("Index out of bound")

n=0

for i in list_three:

   if i.isdigit():

           n+=1

   else:

       print("The list has some non number values")

print(list_three)

3 0
2 years ago
alexa is scanning a photograph whitch mode should she use A green tone B blue tone C greyscale D sepia ​
shepuryov [24]

Answer:

grey scale......................

6 0
3 years ago
Read 2 more answers
__________________ are evaluations of a network
BigorU [14]

Answer:

 The evaluation of the network is basically depend upon the various factors such as the stage, type and size of the network development. The main purpose for the evaluation of the network is that the system works with high efficiency without any interruption in the network.

According to the size and the type of the network we can easily evaluate the particular network in the system and then we can easily work on the network infrastructure to make the network more efficient.

7 0
4 years ago
Which of the following commands are part of the Cells group on the HOME tab?​
tia_tia [17]

common commands such as bold, underline, copy, and paste. Also for cells format worksheet something like that...

4 0
3 years ago
What is output by: print(len(stuff))
dalvyx [7]

Answer:

5

Explanation:

The code print out the length of the string "stuff" which equals 5.

5 0
3 years ago
Other questions:
  • Where do today's computers store almost all motherboard configuration data?
    15·1 answer
  • You recently set up a DHCP server and need to configure your computer to start using it. Click the IPv4 properties option that y
    10·1 answer
  • In cell h15 enter a vlookup function to determine the 2018 percentage of total attendance for the city listed in cell h14. Use t
    7·1 answer
  • Find the word-length 2's complement representation of each of the following decimal numbers:a. 845b. 15000c. 100d. -923
    8·2 answers
  • What is the purpose of an index page feature in a Word document? Check all that apply.
    6·2 answers
  • Which troubleshooting procedure is most useful when the operating system reports that a file cannot be opened? (A.)rebooting the
    12·2 answers
  • What was the first computer programming language?
    7·2 answers
  • Expain the application areas of ICT in education sector and E-commerce​
    12·1 answer
  • Which document would be best created using Word online
    11·2 answers
  • Which of the following are the two main types of copyright relevant to the recording industry? Select all that apply
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!