I am trying to write a program that holds the amount of times a user buys either product a, b, or c, each have a set amount. I want to loop the program so that it is continuously ran until the user enters 'Z' and then output the total amount of each three products as well as the total. The program will compile but it is not running the way I want, I'm not getting any output but the loop does continue to run until I put a 'z'. What am I missing here? I want to keep a running total of all 3.
See my post here: http://www.cplusplus.com/forum/beginner/185611/
You have to create a function that includes the while loop and switch statement and create a case for Z and z that returns 1 inside of the switch statement so that it breaks out of the entire function, then returns to int main and outputs the totals.
I just started learning c++ so if there's a better way to do this please let me know.