Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 

Output #2

Enter product: Grapes Enter price: 1.59 Enter quantity: 7 Order Summary Item: Grapes Quantity: 7 You are receiving a 0.0% quantity discount. You are receiving a 0.0% order total discount. Your shipping cost is $6.99 Total with shipping and discounts: $18.12 Would you like to create another order? y Enter product: Apples Enter price: 3.49 Enter quantity: 19 Order Summary Item: Apples Quantity: 19 You are receiving a 5.00% quantity discount. You are receiving a 0.00% order total discount. Your shipping cost is $1.99 Total with shipping and discounts: $64.98 Would you like to create another order? N

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

__________ the people within an organization.

Answered: 1 week ago