I'm trying to have the user input the product number and quantity of each product. It isn't t working right, I'm not sure what order to put everything.
It only outputs the price of the last product in my function.
Lines 52-61: Switch statements are designed in such a way that you can fall through the different cases, which makes making a set of cases do the same thing easy. Just below each prodPrice line, there needs to be a break to jump out of the switch statement, as you don't want that fall-through behavior.
Thank you, that helps a lot. Now how can I calculate the total price of all products and quantities entered? Should my calculations go outside the while loop? My total price is outputting $0.
I've taken mt calculations out of my loop (just to see if it works) I think it's better? However, when i enter n to quit it enters into an infinite loop. :(