A restaurant has 3 lunch combos for customers to choose:
Combo A: Fried chicken with coleslaw [price: 6.00]
Combo B: Roast beef with mashed potato [price: 6.25]
Combo C: Fish and chips [price: 5.75]
Write a program to calculate how much a group of customers should pay. The program first asks how many customers there are in the group. Then it asks the combo ordered by each customer. If case a customer does not want to order anything, the cashier will enter X, which means order nothing, into the program. When every customer in the group has placed his/her order, the program will display the number of each combo ordered and the total amount of this group’s bill.
On line 22, your for loop syntax is incorrect.
For loops follow the pattern for(variable, condition, increment).
Your variable, counter, should begin at 0.
Your loop should continue while counter is less than customers; loop once per customer.
Your increment is simply adding one to counter.
That said, your for loop should look like this:
1 2 3 4
for(int counter = 0; counter < customers; ++counter)
{ //loop until counter >= customers, and increment counter each loop
//....
}