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
4 Respostas
+ 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;
+ 1
eloufou
Working
Show me your latest code.
0
A͢J, Dosent work but still thx for your help
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