Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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