Question: 0.6(HW#8) (1) The following array P represents the prices, in $, of different goods in a store: P=[12,7.95,88,26.5,27.9,3.5,57,65.9,17.7,35.6,15,96.5] A discount strategy is applied as follow:

0.6(HW#8) (1) The following array P represents the prices, in $, of different goods in a store: P=[12,7.95,88,26.5,27.9,3.5,57,65.9,17.7,35.6,15,96.5] A discount strategy is applied as follow: - 5% discount for goods that are less than 10$ - 15% discount for goods that are between 10$ and 30$ - 20% discount for goods that are above 30$ Write a MATLAB program to define the prices P and returns an array representing the prices after application of the discount. You must use for loop and if statement to find the new prices. Display your results in a table with headings showing the prices before and after discount
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
