際際滷

際際滷Share a Scribd company logo
1. A whole sale office supplier Mutiara Indah company, discounts the price of each of its products
depending on the number of units bought and the price per unit. The discounts are given in the
following table :
Number Bought
Unit Price (RM)
0  10.00 10.01  100.00 100.01 
1  9 0% 2% 5%
10  99 5% 7% 9%
100  499 9% 15% 21%
500  999 14% 23% 32%
1000  21% 32% 43%
The company wants to create a program that reads the number of units bought and the unit
price, and then calculates and prints the total full cost, the discount given, and the total after
discount. You as a programmer is required to :
a) Analyze the problem (input, process and output)
b) Draw a flow chart.
c) Create a program based on the flow chart
d) Print out an example of input and output.
You should include a proper documentation in your program.

More Related Content

Basic pengaturcaraan

  • 1. 1. A whole sale office supplier Mutiara Indah company, discounts the price of each of its products depending on the number of units bought and the price per unit. The discounts are given in the following table : Number Bought Unit Price (RM) 0 10.00 10.01 100.00 100.01 1 9 0% 2% 5% 10 99 5% 7% 9% 100 499 9% 15% 21% 500 999 14% 23% 32% 1000 21% 32% 43% The company wants to create a program that reads the number of units bought and the unit price, and then calculates and prints the total full cost, the discount given, and the total after discount. You as a programmer is required to : a) Analyze the problem (input, process and output) b) Draw a flow chart. c) Create a program based on the flow chart d) Print out an example of input and output. You should include a proper documentation in your program.