Write a program that asks the user to order an ice cream treat. The user selects the type of ice cream, the sauce, and whether or not to add sprinkles. Use the screen shots below as a guide. Note that the user can answer the questions in any order and can change his/her mind. Also note that the "chocolate" may refer to either the ice cream or the sauce; assume the answer "chocolate" refers to sauce if the ice cream flavor has already been selected, otherwise assume it refers to the ice cream flavor.
I've finally figured out the majority of my program, but there is only one last problem. I can't for the life of me decide on how to fix the chocolate part. When you enter chocolate, it automatically assigns it to both the ice cream and sauce. Is there a way I can assign it to just the first question (ice cream) initially?
I think the problem is looking for something like this (psuedocode):
print "What ice-cream do you want?"
get user input
//here you deal with the input, and assign it appropriately
//e.g.:
if answer == "chocolate"
if icecream.empty() icecream = answer
etc...
So you don't ever specifically prompt them for "What flavor" etc...
It still sounds kind of odd to me but that's what they assigned.