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 02:10
3. (5 points) describe what would be printed by the code below or what error would occur. const char* cstr = "0123456"; const char* ptr = & cstr[4]; cout < < ptr[-1] < < ptr < < endl; 1 4. (5 points) theseus has been trapped in a maze with a minotaur, which is trying to capture him. each round, theseus and the minotaur move through the maze; theseus towards the exit, and the minotaur towards theseus. theseus can move in any of the four cardinal directions, or he can wait for a round to see how the minotaur moves. write code that creates a data type to represent the possible moves that theseus could make.
Answers: 3
question
Computers and Technology, 23.06.2019 20:50
3.11.3 quiz: comparing and analyzing function typesquestion 4 of 102 pointswhat can you say about the y-values of the two functions f(x) = 3x2-3 andg(x)=2* - 3?
Answers: 2
question
Computers and Technology, 24.06.2019 11:00
Each row in a database is a set of unique information called a(n) ? a.) table. b.) record. c.) object. d.) field.
Answers: 2
question
Computers and Technology, 24.06.2019 18:30
*write a program that defines symbolic names for several string literals (chars between quotes). * use each symbolic name in a variable definition. * use of symbolic to compose the assembly code instruction set can perform vara = (vara - varb) + (varc - vard); ensure that variable is in unsigned integer data type. * you should also further enhance your symbolic logic block to to perform expression by introducing addition substitution rule. vara = (vara+varb) - (varc+vard).
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
question
Mathematics, 02.03.2021 01:00
question
Social Studies, 02.03.2021 01:00
question
Mathematics, 02.03.2021 01:00
question
Mathematics, 02.03.2021 01:00
Questions on the website: 13722363