X1203: Codewit Juan: Groceries with Functions in C++

Complete the calculatePrice function so that each item in the provided cart added to the total price. Any item that is "milk" costs $2.50, "fruit" is $1.50 and "vegetable" is $2.00.

The cart may have one or more of each of those items, but if none of those items are in the cart, the total cost should be $0.

Your Answer:

Reset

Practice a different C++ exercise

Feedback

Your feedback will appear here when you check your answer.