Drink Machine simulator program help!

(found answer)
Last edited on
Ok, I have actually found out the answer to my problem. Just needed to walk away for a second after staring at it for too long. Turns out in main() I needed to have my while loop as follows
while(choice != 6)

I had it as 5 instead of 6. So that figured out my adding up the total profit problem. But now I'm trying to have it print out the table in descending order according to the amount of remaining cans. I'm sort of at a loss as to where to start, does anyone have any suggestions? Thanks in advance!
Topic archived. No new replies allowed.