0

In Ballpark Orders challenge, can you tell me what is to correct cause 3 of the event dosent want to be true.

I think it's because of when a friend don't take something on the menu they charge I'm for a coke. How can I make it so it charge them a coke when none of the other item are taken? Here is my code https://code.sololearn.com/cC4lYxI20pA4/?ref=app

14th Aug 2022, 4:14 AM
eloufou
eloufou - avatar
4 Antworten
+ 1
eloufou //getline(cin, order); // for (int i = 0; order[i]; i++) while (cin >> order) { y = order; if(y == "Pizza") { pizza++; } else if(y == "Water") { water++; } else if(y == "Cheeseburger") { cheeseburger++; } else if(y == "Nachos") { nachos++; } else { coke++; } } priceBT = (cheeseburger * 10.0) + (pizza * 6.0) + (nachos * 6.0) + (water * 4.0) + (coke * 5.0); priceAT = ((priceBT * 7) / 100) + priceBT; cout << priceAT;
14th Aug 2022, 6:22 AM
A͢J
A͢J - avatar
+ 1
eloufou Working Show me your latest code.
14th Aug 2022, 2:50 PM
A͢J
A͢J - avatar
0
A͢J, Dosent work but still thx for your help
14th Aug 2022, 2:30 PM
eloufou
eloufou - avatar
0
A͢J I'll show you my code but can you show me yours with all the variable and the headers pls? write me in private chat
14th Aug 2022, 2:59 PM
eloufou
eloufou - avatar