Answered step by step
Verified Expert Solution
Link Copied!

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

  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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Driven Web Sites

Authors: Mike Morrison, Joline Morrison

1st Edition

061901556X, 978-0619015565

More Books

Students also viewed these Databases questions

Question

How do Data Types perform data validation?

Answered: 1 week ago

Question

How does Referential Integrity work?

Answered: 1 week ago