Question: I am learning about loops program in C ++. I can do all the steps except how to get the total price from the loops.

I am learning about loops program in C ++. I can do all the steps except how to get the total price from the loops.

Please help me. Thank you

I am learning about loops program in C ++. I can do

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.

Prices: Ham - $4 Veggie - $3 Rat - $2 Bacon - $.50 Hair - $.10 1. First ask the user what kind of sandwich they want: Ham, Veggie, or Rat. 2. Depending on what kind of sandwich they want, ask what toppings they want: 3. Only ham and rat sandwiches can have bacon. Only rat and veggie can have hair. 4. Display the final price of the sandwich they made

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!