Question: Matlab Write the corresponding Matlab program two times, using the following apporches (one at a time): -Nested if-else statments -Switch statments Problem 1 A shopping
Problem 1 A shopping website is offering some promotion coupons for price discounts. The following table gives the promotion coupon code and its discount value. The program should ask the user to input the total price before the discount and the coupon code. Then it should output the final discounted price. Write the corresponding MATLAB program two times, using the following approaches (one at a time): Nested if-else statements Switch statements . Coupon Code Rr U, u PP Z, Discount % 5% 10% 50% 75% Sample Output: Enter Total Price: 100 Enter a enter your coupon : x Invalid Coupon. Enter Total Price: 100 Enter a enter your coupon : Total Price after 5% discount is 95 AED Enter Total Price: 100 Enter a enter your coupon : P Total Price after 50% discount is 50 AED
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
