c++ Total Purchase A customer in a store is purchasing five items. The prices of the five items are: price of item 1 = $15.95 price of item 2 = $24.95 price of item 3 = $6.95 price of item 4 = $12.95 price of item 5 = $3.95 Write a program that holds the prices of the five items in five variables. Display each item’s price, the subtotal of the sale (total price of five items without tax), the amount of sales tax, the total. Assume the sales tax is 7%, define it as a named constant in your program.
Max Function
Statistical function is of many categories. One of them is a MAX function. The MAX function returns the largest value from the list of arguments passed to it. MAX function always ignores the empty cells when performing the calculation.
Power Function
A power function is a type of single-term function. Its definition states that it is a variable containing a base value raised to a constant value acting as an exponent. This variable may also have a coefficient. For instance, the area of a circle can be given as:
c++
Total Purchase
A customer in a store is purchasing five items. The prices of the five items are:
price of item 1 = $15.95
price of item 2 = $24.95
price of item 3 = $6.95
price of item 4 = $12.95
price of item 5 = $3.95
Write a program that holds the prices of the five items in five variables. Display
- each item’s price,
- the subtotal of the sale (total price of five items without tax),
- the amount of sales tax,
- the total.
Assume the sales tax is 7%, define it as a named constant in your program.
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images