Question: Write a C++ program named Lab5D that will complete the following task. A pizza store charges $10.50 for a small pizza, $12.00 for a medium

  1. Write a C++ program named Lab5D that will complete the following task.

A pizza store charges $10.50 for a small pizza, $12.00 for a medium pizza, and $14.75 for a large pizza. Write a program that will do the following:

  1. Create a constant variable named taxRate and set it equal to .0825
  2. Read the number of small pizzas, medium pizzas & large pizzas ordered from a text file (Lab5D.txt).
  3. Calculate the subtotal for the pizzas by multiplying their prices by their counts and adding it all up.
  4. Calculate the amount of tax by multiplying the subtotal by taxRate.
  5. Calculate the total price by adding the subtotal to the tax.
  6. Print the number of each type of pizza with labels.
  7. Print the subtotal, tax and total with labels and 2 decimal places.

(After you run the program using the Lab5D.txt file, your program should come up with subtotal=92.00, tax=7.59 and total=99.59. I will grade it with a different set of input values to make sure your logic works.)

NOTE: PROGRAM MUST BE IN C++ USING VISUAL STUDIO PLEASE!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!