subject

You are to write a program that will calculate the total cost of a Pizza. The code should ask the user if they want an S, M, or L pizza (small, medium, or large). Based on the size they choose, you should add $5.00, $7.00, or $9.00 to the total bill. Ask the user if they want 0, 1, or 2 extra toppings. If they choose 1, add $1.00 to the bill. If they choose 2, add $1.50. Now add 10% tax to the bill, and write out a message telling them how much the total bill is. Don't worry if the answer has more than the 2 normal digits on the right of the decimal point, we will deal with that later. Assume perfect data entry, no user mistakes. Keep track of the cost with a type decimal, which means when you set its value to, for example, 5.00, you need to add an m at the end, 5.00m. Use some selection of if, if else, and else structures (whatever you need) to calculate the correct amount based on their toppings choice and size. Add the tax. Below are some sample runs of my program. Your screen output doesn't have to look exactly the same, but they should be similar and definitely have the same dollar answers as I show. ZIP all of the solution files and submit. Assume perfect data entry, no user mistakes. Keep track of the cost with a type decimal, which means when you set its value to, for example, 5.00, you need to add an m at the end, 5.00m. Use some selection of if, if else, and else structures (whatever you need) to calculate the correct amount based on their toppings choice and size. Add the tax. Below are some sample runs of my program. Your screen output doesn't have to look exactly the same, but they should be similar and definitely have the same dollar answers as I show. ZIP all of the solution files and submit. Example #1: What size pizza would you like, S, M, or L (small, medium, or large)? S You selected small, that will be $5.00 How many toppings would you like, 0, 1, or 2? 0 Thank you for your order, it will be done shortly.
Including 10% tax, you total bill is $5.500 Example #2: What size pizza would you like, S, M, or L (small, medium, or large)? m You selected medium, that will be $7.00 How many toppings would you like, O, 1, or 2? 1 Thank you for your order, it will be done shortly. Including 10% tax, you total bill is $8.800 Example #3: What size pizza would you like, S, M, or L (small, medium, or large)? 1 You selected large, that will be $9.00

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 17:50, ImBADatmath8743
Farah works in an office with two other employees. all three share a printer and an internet connection. the utility that makes this possible is defragger quicktime soho winzip
Answers: 1
image
Computers and Technology, 22.06.2019 20:00, ksanchez2100
Need asap assignment directions: think of an organization (business, religious institution, volunteer organization, sports team) with which you have been involved. imagine outfitting it with an it infrastructure. prepare a plan for what you would do to support outfitting it. draw a map of a network connecting all the individuals, give them pcs and printers, and lay out the design as best you can. the purpose is to begin working with these concepts, not to build a perfect network.
Answers: 2
image
Computers and Technology, 24.06.2019 01:00, Timeisjesus
Answer these and get 40 points and brainliest
Answers: 1
image
Computers and Technology, 24.06.2019 01:30, kevin72836
Hazel has just finished adding pictures to her holiday newsletter. she decides to crop an image. what is cropping an image?
Answers: 1
You know the right answer?
You are to write a program that will calculate the total cost of a Pizza. The code should ask the us...

Questions in other subjects:

Konu
History, 25.06.2019 08:30