Question: Write in Matlab A restaurant sells five different desserts whose prices are shown in the following table: Dessert Number Unit Price($) 1 2.98 2 4.5
Write in Matlab
A restaurant sells five different desserts whose prices are shown in the following table:
| Dessert Number | Unit Price($) |
|---|---|
| 1 | 2.98 |
| 2 | 4.5 |
| 3 | 9.8 |
| 4 | 4.5 |
| 5 | 3.85 |
Write a Matlab program to display the above menu to the user. The program then prompts the customer for a key board entry of a series of pairs of numbers as follows.
Dessert Number:
Quantity sold:
The program should then use the switch statement to obtain the total price for the selected product. The program should also display the results after the computation using appropiate format statements.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
