Computers and Technology

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

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 22:00, marshunsanders
What must you do before formatting a paragraph?
Answers: 1
image
Computers and Technology, 22.06.2019 01:10, shimmerandshine1
When you reach a yield sign, yield to cross traffic and before you enter the intersection. a. flash your headlights b. wait for a signal c. wait five seconds d. wait for a safe gap
Answers: 1
image
Computers and Technology, 23.06.2019 11:00, abdulbasharee99
In the context of the box model, what is the difference between a margin and a padding? a. a padding lies outside a box border, while a margin lies inside it. b. a padding lies inside a box border, while a margin lies outside it. c. a padding can be adjusted independently, while a margin depends on the size of its box. d. a padding depends on the size of its box, while a margin can be adjusted independently.
Answers: 3
image
Computers and Technology, 24.06.2019 13:00, Savtheartist23
Ais a built in formula in spread spread a is any math process such as addition or subtraction. options are function and operation
Answers: 1
Do you know the correct 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
Mathematics, 18.09.2020 08:01
Konu
Mathematics, 18.09.2020 08:01
Konu
Social Studies, 18.09.2020 08:01
Konu
Geography, 18.09.2020 08:01
Konu
Mathematics, 18.09.2020 08:01
Konu
Mathematics, 18.09.2020 08:01
Konu
Arts, 18.09.2020 08:01
Konu
Mathematics, 18.09.2020 08:01
Konu
English, 18.09.2020 08:01
Konu
Geography, 18.09.2020 08:01