Question
Question 1 An online shopping platform is going to organize a sales promotion for the 2021-year end. During the promotion period, a discount of 10%
Question 1 An online shopping platform is going to organize a sales promotion for the 2021-year end. During the promotion period, a discount of 10% will be given for each item purchased if the number of items being purchased is at least 5 items. On top of that, if the total sum of purchase if RM 1,000 or more, an additional discount of 15% will be given. A customer can purchase different items and different number of units of the same item (a) Based on the description above, draw the flowchart to calculate and display the total discount in percentage (%) and the total price a customer needs to pay after discount in RM - if applicable. (5 marks) (b) John plans to shop 3 items during the promotion period. Write the MATLAB code to request John to input the price for 3 items and the quantity for the 3 items he wants to purchase. Then calculate the total discount and price after discount using the flow chart in (a). The expected output display of your program is as follows: Enter Price of Item 1 : Enter Quantity of Item 1 : Enter Price of Item 2 : Enter Quantity of Item 2 : Enter Price of Item 3 : Enter Quantity of Item 3 : Total discount = XX % Total price after discount = RM YY (5 marks)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started