Question

MATLAB Program Pick a pizza: Create a list for a user to pick either Cheese, Mushroom,...

MATLAB Program

Pick a pizza: Create a list for a user to pick either Cheese, Mushroom, or Sausage pizza.

If they pick none of them write: "No Pizza for you!", otherwise write "Order a _______ pizza" (where _______ is the type of pizza they selected).

0 0
Add a comment Improve this question Transcribed image text
Answer #1

`Hey,

Note: Brother if you have any queries related the answer please do comment. I would be very happy to resolve all your queries.

clc%clears screen
clear all%clears history
close all%closes all files
s={'Cheese','Mushroom','Sausage pizza'};
for i=1:length(s)
fprintf('Press %d to order %s pizza\n',i,s{i});
end
fprintf('Press 0 to pick none\n');
n=input('Enter choice: ');
if(n==0)
fprintf('No Pizza for you!\n');
else
fprintf('Order a %s pizza\n',s{n});
end

Kindly revert for any queries

Thanks.

Add a comment
Know the answer?
Add Answer to:
MATLAB Program Pick a pizza: Create a list for a user to pick either Cheese, Mushroom,...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Create a Python program using a list. You are the owner of a cheese shop, "The...

    Create a Python program using a list. You are the owner of a cheese shop, "The Deceased Macaw" and a customer has arrived. Write a program to greet them. You should first ask if the customer is interested in cheddar, if so, then they are given cheddar. Otherwise, you say that you'll find something. If they say that they don't want cheese, you ask them why they are in a cheese shop? In this exercise, valid user responses are "yes"...

  • Create a user friendly interface to order a pizza. Use appropriate controls (radio buttons, list boxes,...

    Create a user friendly interface to order a pizza. Use appropriate controls (radio buttons, list boxes, check boxes) to obtain the type of pizza (e.g. small, medium, large) and the toppings. Calculate the cost of the pizza based upon the size, number of toppings and delivery charge. Display a summary of the order in a text area along with the total cost. Provide buttons which places the order and clears the order. Allow for multiple pizzas to orders Submit as...

  • Create a website for a pizza company where a user can choose one or more individual toppings(vegi...

    Create a website for a pizza company where a user can choose one or more individual toppings(vegie, cheese, meat, etc) and a size to order a pizza and see the final cost. Allow the user to choose toppings and size for the pizza they’d like to order. Create a pizza object constructor with properties for toppings and size. Create a prototype method for the cost of a pizza depending on the selection chosen. HTML and JavaScript

  • NOTE:- NO "BREAK" COMMAND PLEASE This program allows the user to create a grocery list, which...

    NOTE:- NO "BREAK" COMMAND PLEASE This program allows the user to create a grocery list, which will give them a breakdown of each item they want to buy, including the amount that should be purchased. The program must use two separate lists to accomplish this! The user can continue entering items indefinitely, stopping only when theyenter the sentinel value “END”. After entering each item, they should be asked how many of that item they want to buy. After their list...

  • The Task: Create a console application that prompts the user to select either a stack, queue,...

    The Task: Create a console application that prompts the user to select either a stack, queue, linked list, or binary search tree. Then prompt the user for a number that will then be passed to a recursive function that will populate an array in ascending order. If user selected binary search tree, they will then be prompted to choose how the data will be received either in-order, preorder, or post-order. If user selected linked list, they will then be prompted...

  • Create an order entry screen program in C# to give a total for an individual pizza...

    Create an order entry screen program in C# to give a total for an individual pizza order. The Pizza order should have radio buttons for small $7, medium $9, and large $12 choices for the pizza. There should be a checkbox for drink (where a drink is $2 added if it is checked and nothing added if it is not checked. Include a textbox for the customer’s name. Have a button to calculate the subtotal (pizza choice and whether there...

  • using C# language This program will demonstrate inheritance. Your Pizza Shop expands and now handles delivery...

    using C# language This program will demonstrate inheritance. Your Pizza Shop expands and now handles delivery orders and sit down orders in a restaurant setting. There are differences in a SeatedPizzaOrder and a DeliveryPizzaOrder. These are more specialized versions of the PizzaOrders you have been creating all along and you decide to write a program that handles them the same as much as possible and reuses the code of a general PizzaOrder class as much as possible to demonstrate inheritance....

  • In Matlab. Use loops. 2. Create an algorithm to allow the user to enter a list...

    In Matlab. Use loops. 2. Create an algorithm to allow the user to enter a list of courses they have taken along with the grades received and the credit hours for each course, and then calculate the user's GPA. The program should first ask the user to type either Yes or No in response to the question, "Do you want to enter a grade?" If the answer is Yes, the user should be asked to enter the name of the...

  • write in python Create a program that will ask the user for a list of integers,...

    write in python Create a program that will ask the user for a list of integers, all on one line separated by a slash. construct a list named "adj_numbers" which contains the users input numbers after subtracting 2 from each number. then print the resulting list. the input statement and print statement are given to you in the starting code. a sample run of the program is as follows: Enter a list of integers, separated by slashes: 7/3/6/8 resulting list:...

  • MATLAB Write a program where the user enters hour of the day (between 1 and 12)...

    MATLAB Write a program where the user enters hour of the day (between 1 and 12) and you output what the next hour is.

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT