Question
Write a program that computes the cost of at least one order. The program will ask the user to enter the product, the price, then
Write a program that computes the cost of at least one order. The program will ask the user to enter the product, the price, then the quantity. It will then compute the order total. After it displays the order total, it will ask if the user wants to create another order. The program ends with a new line.
The discounts are as follows:
The customer will receive a 5% discount for ordering 10 - 49 items and a 15% discount for ordering 50 or more items. They will also receive a order discount of 25% for orders over $100.00. Shipping is $1.99 for orders over $50.00, otherwise it is $6.99. Hints:
- after input, calculate the cost
- find the quantity discount and put it in a variable
- compute new cost
- find the order total discount and put it in a variable
- compute the new cost
- find shipping amount
- compute cost
- print everything out at end
Below is sample output
Output #1
Enter product: Grapes Enter price: 1.59 Enter quantity: 22 Order Summary Item: Grapes Quantity: 22 You are receiving a 5.0% quantity discount. You are receiving a 0.0% order total discount. Your shipping cost is $6.99 Total with shipping and discounts: $40.22 Would you like to create another order? n
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started