Question: In MATLAB, modify your code from the previous problem so that the user can order as many pizzas as he/she would like. Still use the

In MATLAB, modify your code from the previous problem so that the user can order as many pizzas as he/she would like. Still use the Menu command and incoporate loops. After the order is complete, display the total cost for the pizzas, as well as the number of pizzas of each type.

*** I have included the code to the previous problem ***

clear, clc, close all

option = menu('Pizza', 'Cheese Pizza', 'Mushroom Pizza', 'Pepperoni Pizza', 'Sausage Pizza');

switch option

case 1

disp('The cost is $5.00');

case 2

disp('The cost is $5.50');

case 3

disp('The cost is $5.75');

case 4

disp('The cost is $5.60');

end

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!