statement. For example, if the value of A is 0 and the value of B is 4, the value of M will be 4. (5 points) Prompt the user to enter the price of M chairs. The main function then prints the price of each chair after discount as shown below in the sample output. The main function then prints the total price after discount of all chairs which get a discount of 10%. Note that you cannot use a loop in this section. (15 points) Price Price < 1000 1000 < Price <=2000 Price > 2000 Page 2 of 4 Discount 10% 15% 20%
//////////////////Part C ///// 40375 40375 40375 40375 40375 40375 40375 40375 40375 40375 40375 40375 40375 40375 40375 40375 40375 40375 40375 Part C is created by student ID = 40375- section F3. Enter price of chair #1: 1500 Enter price of chair #2: 100 Enter price of chair #3: 2222 Enter price of chair #4: 150 Price of chair #1 after Price of chair #2 after Price of chair #3 after discount is 1275.000 discount is 90.000 discount is 1777.600 Price of chair #4 after discount is 135.000 Total price after discount of all chairs which got a discount of 10% is 225.000
C. The main function should then perform the following: • Prints in the screen 5 lines that contains your AUM ID. For example, if your AUM ID is 40375, the number 40375 to be printed per line depends on your AUM ID. If your AUM ID is 40375, the first line should contain 4 times "40375", the second line should contain 0 times "40375", the third line should contain 3 times "40375", the fourth line should contain 7 times "40375" and the fifth line should contain 5 times "40375". You can use only printf instruction in this part. (5 points) • Initializes two integers B and A with the first and second digits of your AUM ID, respectively. If your ID is 40375, the value of A will be 0 and the value of B will be 4. (5 points) The main function should initialize a variable M with the largest of the two numbers A and B using an if C. The main function should then perform the following: • Prints in the screen 5 lines that contains your AUM ID. For ex
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am