The assignment states that you need to ask all three questions right off the bat, continually ask the questions until one of the correct responses is given, when a correct response is given the program checks to see what questions was answered, then takes that questions away and asks the remaining questions again. i know that's a bit confusing, it was to me at first, but here is an example (each >> is user input):
Do you want vanilla, chocolate, or twist?
Hot fudge, chocolate, or strawberry sauce?
Do you want sprinkles (yes/no)?
>>Hello
Do you want vanilla, chocolate, or twist?
Hot fudge, chocolate, or strawberry sauce?
Do you want sprinkles (yes/no)?
>>vanilla
Hot fudge, chocolate, or strawberry sauce?
Do you want sprinkles (yes/no)?
>>hello
Hot fudge, chocolate, or strawberry sauce?
Do you want sprinkles (yes/no)?
>>strawberry
Do you want sprinkles (yes/no)?
>>yes
You chose vanilla ice cream with strawberry sauce and. sprinkles.
As you can see, the program will eliminate questions already answered, and continue to ask until one of the responses is given.
My problem is that with my current code, the program will not stop asking the sprinkles question even if it already answered and only if it is the last questions answered, so it looks like this:
Do you want vanilla, chocolate, or twist?
Hot fudge, chocolate, or strawberry sauce?
Do you want sprinkles (yes/no)?
>>yes
Do you want vanilla, chocolate, or twist?
Hot fudge, chocolate, or strawberry sauce?
Do you want sprinkles (yes/no)?
>>yes
Do you want vanilla, chocolate, or twist?
Hot fudge, chocolate, or strawberry sauce?
Do you want sprinkles (yes/no)?
etc......
What makes this assignment even more boggling is that I can't simply have the questions asked up front, because there are TWO "chocolate" responses, one for ice cream and one for the sauce. Since the program HAS to ask all the questions up front, I needed to figure out a way to tell the program that the first "chocolate" input by the user is for the ice cream ONLY and not for the sauce. When the user inputs "chocolate" again, it is for the sauce.
Here is a link to the same assignment that was asked before on this forum, but did not answer my questions despite it being checked as "solved":
http://www.daniweb.com/forums/thread150790.html