Home center mall wants to make a C program to make it easier for the cashier man to check the sale and taxes on some products: Part 1: 1) Using a while loop prompt the user to enter the price of M chairs. Then prints the price of each chair after discount as shown below in the following table. 2) The program then prints the total price after discount of all chairs which got a discount of 10% ONLY. Price, Discount Price < 1003, 10% 1003 <= Price <= 2006, 15% Price > 2006, 20% 3) Using a do while loop, ask the user if he wants to repeat the last operation again if he pressed ‘y’ then repeat and if he pressed ‘n’ then do not. (NOTE: you can make it by any way) Part 2: 4) After that, initialize a variable N with the sum of digits of your student ID. For example, if your EUI_ID number is 42357, the value of N is 21 (4+2+3+5+7 = 21). Then print the value of N on the screen. 5) Using a while loop, Enter the price of all N desks, print the average price of all N desks with and without tax. Then you should calculate the average price after tax of all desks which get a tax of 3% following the next table. 6) If the user entered 0(zero) it exits from the previous step. Price, Tax Price > 1003, 5% Price <=1003, 3% 7) At the end, print your ID and your group. 8) The output must be like the following sample output
Home center mall wants to make a C program to make it easier for the cashier man to check the sale and taxes on some products:
Part 1:
1) Using a while loop prompt the user to enter the price of M chairs. Then prints the price of each chair after discount as shown below in the following table.
2) The program then prints the total price after discount of all chairs
which got a discount of 10% ONLY.
Price, Discount
Price < 1003, 10%
1003 <= Price <= 2006, 15%
Price > 2006, 20%
3) Using a do while loop, ask the user if he wants to repeat the last
operation again if he pressed ‘y’ then repeat and if he pressed ‘n’ then do
not. (NOTE: you can make it by any way)
Part 2:
4) After that, initialize a variable N with the sum of digits of your student
ID. For example, if your EUI_ID number is 42357, the value of N is 21
(4+2+3+5+7 = 21). Then print the value of N on the screen.
5) Using a while loop, Enter the price of all N desks, print the average price
of all N desks with and without tax. Then you should calculate the average
price after tax of all desks which get a tax of 3% following the next table.
6) If the user entered 0(zero) it exits from the previous step.
Price, Tax
Price > 1003, 5%
Price <=1003, 3%
7) At the end, print your ID and your group.
8) The output must be like the following sample output
Step by step
Solved in 2 steps with 1 images