+ 1

Ballpark challenge in C

Hi, trying to do ballpark challenge in C, however I can only get the first two test cases working..please let me know if this can be coded better https://code.sololearn.com/cy0vNDXAjjKD/?ref=app

9th Jun 2020, 10:21 AM
Matt
Matt - avatar
2 Answers
0
You and three friends go to a baseball game and you offer to go to the concession stand for everyone. They each order one thing, and you do as well. Nachos and Pizza both cost $6.00. A Cheeseburger meal costs $10. Water is $4.00 and Coke is $5.00. Tax is 7%. Task Determine the total cost of ordering four items from the concession stand. If one of your friend’s orders something that isn't on the menu, you will order a Coke for them instead. Input Format You are given a string of the four items that you've been asked to order that are separated by spaces. Output Format You will output a number of the total cost of the food and drinks. Sample Input 'Pizza Cheeseburger Water Popcorn'
9th Jun 2020, 10:22 AM
Matt
Matt - avatar
0
You have to focus on this part: "If one of your friends orders something that isn't on the menu, you will order a Coke for them instead."
9th Jun 2020, 11:50 AM
Kuba SiekierzyƄski
Kuba SiekierzyƄski - avatar