Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Software Sale A software company sells a package that retails for $99. Quality discounts are given according to the following table: Quantity Discount 10-19 10%

Software Sale

A software company sells a package that retails for $99. Quality discounts are given according to the following table:

Quantity

Discount

10-19

10%

20-49

20%

50-99

30%

100 or more

40%

Write a program that asks the user to enter the number of packages purchased. The program should the display the amount of the discount (if any) and the total amount of the purchase after the discount.

All the numbers have to be rounded to two decimal places as shown below.

Sample run:

Enter the number of packages purchased: 10

Discount Amount: $ 99.00

Total Amount: $ 891.00

Enter the number of packages purchased: 20

Discount Amount: $ 396.00

Total Amount: $ 1584.00

Enter the number of packages purchased: 50

Discount Amount: $ 1485.00

Total Amount: $ 3465.00

Enter the number of packages purchased: 100

Discount Amount: $ 3960.00

Total Amount: $ 5940.00

Please Write it in programming C language and explain what we are doing in each step.

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_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

Students also viewed these Databases questions