Question: this is C++ for beginner Need to do nested loop to ask customer what kind of sandwich do they want Ham $4, Veggie $3, Rat

this is C++ for beginner
Need to do nested loop to ask customer what kind of sandwich do they want
Ham $4, Veggie $3, Rat $2
Keep asking if they want more sandwich until they want to stop then show the total price.
this is C++ for beginner Need to do nested loop to ask
customer what kind of sandwich do they want Ham $4, Veggie $3,
last homewrk is just a program to ask customer what kind of sandwich do they want : Ham $4 Veggie $3 or Rat $2 . this week is needed to use nested loop to keep asking, and handle when they input wrong number or they want to stop

Available after Mar 2 at 12am You are writing a program for a Which Wich cash register. You already have code that can make one sandwich. Instead of telling them the price of just the one sandwich, keep asking if they want another sandwich until they choose to stop. Then print the total cost of all sandwiches. You need to check if their input is valid (nested loop) but you don't need to worry about wrong types. Fixing them entering anh when you want a 2 will be covered in a few weeks. (So if the choices are 1, 2, 3, you need to handle 10 or -3, but you don't need to handle 'h' or 'p.) Essentially: Take last week's homework, and put it in a loop. You don't need to port the toppings code. just the multiple sandwich types and their prices. How you do it is up to you. This class is at CS175: Cash Register Design. The theme of the homework doesn't matter. The heart of this whole major is learning the tools you need to solve any problem. If you are totally lost, man sure would be nice if the teacher was on chat 15 hours a week. Oh wait! That's me. Not handling bad input by just saying there is no bad input doesn't count. Say the input is bad and ask again. Making all inputs numbers instead of words will save us both headaches later. do { If you are totally lost, man sure would be nice if the teacher was on chat 15 hours a week. Oh wait! That's me. Not handling bad input by just saying there is no bad input doesn't count. Say the input is bad and ask again. Making all inputs numbers instead of words will save us both headaches later. do { // Show menu and prices do { // input here Jwhile (Bad sandwich input); (1 2 3) // Code to total price do { // input here }while(bad exit input); (1 2) }while(don't want to quit); // Show total Week 95) Loops Program Rubric Pts

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!