Tyster 17 Light Poster

Hi Folks,

Total C++ newbie here so please excuse my errors! I have been tasked with writing a small program and I can't get it to work. Here is the task description...

"A restaurant has 4 lunch combos for customers to choose:

Combo A : Fried chicken with slaw [price: 4.25]
Combo B : roast beef with mashed potato [price: 5.75]
Combo C : Fish and chips [price:5.25]
Combo D : soup and salad [price: 3.75]

Write a program to calculate how much a party of customers should pay. Suppose the party orders 2 B’s, 1 A and 3 D’s. The casher will enter B, B, A, D, D, D and T into the program. The T means “calculating total of the order”. It is a signal telling the computer that the whole order has been entered and it is time to calculate the total amount the party should pay. Assume there is no sales tax. "

I am supposed to try using while loops and switch for this task. I've been tinkering with this and some of this works but some doesn't. For example, when I enter T to calculate the Total I get nothing returned and the program ends. Same thing happens when I enter option C. I suspect that at least part of the problem is my break statements but any advice is GREATLY appreciated. When the program gets to 'break;' does it go back to 'switch' or somewhere …

Ancient Dragon commented: thanks for using code tags right +19