Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
- 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:
- Create a constant variable named taxRate and set it equal to .0825
- Read the number of small pizzas, medium pizzas & large pizzas ordered from a text file (Lab5D.txt).
- Calculate the subtotal for the pizzas by multiplying their prices by their counts and adding it all up.
- Calculate the amount of tax by multiplying the subtotal by taxRate.
- Calculate the total price by adding the subtotal to the tax.
- Print the number of each type of pizza with labels.
- 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started