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

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 07:30
An endless cycle of creation and response on the internet is called
Answers: 1
question
Computers and Technology, 24.06.2019 16:30
Which program can damage your computer?
Answers: 1
question
Computers and Technology, 24.06.2019 18:30
What is the local portion of the e-mail address below? [email protected] a.) @ b.) biz c.) gumchewer d.) twrigley
Answers: 1
question
Computers and Technology, 24.06.2019 18:50
Which style did jack use on the vocabulary words in reports?
Answers: 2
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
Questions on the website: 13722361