C++ Coding - Loops Party shop sells birthday gift bags in two ways. Customers can purchase a set of 12 bags for $25.6 or an individual bag for $1.64. Write a complete program that asks the user input for the number of gift bags need to be purchased (an integer) and outputs the total price of the purchase. For example, if the customer buys 25 gift bags, the customer would be charged for 1 set of (12 bags) plus another 13 individual bags. The subtotal would be 1(25.6) + 13(1.64) = $46.92 Use a constant variable to set a fixed tax rate of 8.875. Display correct dollar values (2 decimal places, use cout precision)
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++ Coding - Loops
Party shop sells birthday gift bags in two ways. Customers can
purchase a set of 12 bags for $25.6 or an individual bag for $1.64.
Write a complete program that asks the user input for the number of
gift bags need to be purchased (an integer) and outputs the total price
of the purchase.
- For example, if the customer buys 25 gift bags, the customer would
be charged for 1 set of (12 bags) plus another 13 individual bags.
The subtotal would be 1(25.6) + 13(1.64) = $46.92 - Use a constant variable to set a fixed tax rate of 8.875.
- Display correct dollar values (2 decimal places, use cout precision)
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 2 images