Question: Note: This is in C++ Write a program to determine the shipping costs for an online purchase. Prompt the user for the number of items

Note: This is in C++

Write a program to determine the shipping costs for an online purchase.

Prompt the user for the number of items using the following prompt: Enter the number of items:

Prompt the user for the purchase price of using the following prompt: Enter the purchase price: $

Calculate the sales tax as 8.25% of the purchase price

Calculate the shipping costs as a flat rate using the following information:

Number of items Shipping cost

1-6 $8.00

7-12 $4.50

more than 12 $1.00

Calculate the total cost as the sum of the purchase price, sales tax and shipping cost

Output the sales tax and shipping costs using the following example:

Purchase price: $##.##

Sales tax: $##.##

Shipping cost: $##.##

Total cost: $##.##

Note: To format the output for 2 decimals use the following include statement: #include and prior to the output statements include the following statement: cout << fixed << setprecision(2);

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!