Question: Variables and Expressions - Total Purchase Total points: 2 5 Write your name, class, and assignment name on top of your program as comments. Submit
Variables and Expressions Total Purchase
Total points:
Write your name, class, and assignment name on top of your program as comments. Submit your
cpp file to DL by the due date and time.
A customer in a store is purchasing five items. The prices of the five items are:
Price of item $
Price of item $
Price of item $
Price of item $
Price of item $
Write a program that holds the prices of the items in five variables. Assume the sales tax
is Display each item's price, the subtotal of the sale, the amount of sales tax and the
total.
Create string variables name, className and assignment, and assign your name,
class and assignment number to these variables. points
Print your name, class and assignment name on top using the string variables you
created in step point
Create a named constant and assign the tax rate ie to it point
Create five variables of a suitable datatype to hold decimal numbers. points
Calculate the subtotal sum of all item prices the tax and the total. Use the named
constant you created in step for calculating the tax. points
Display all of the above, with $ signs and all. See below. points
Include proper comments in program on top, as well as inline. points
Your Name CMPS Assignment
Item : $
Item : $
Item : $
Item : $
Item : $
Subtotal: $
Tax: $
Compile and run your program. Your program must compile and run successfully to
receive full credit for this homework.
Further grading criteria:
Program not compiling: points.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
