
-----------------------------------
Satisfaction
Fri May 09, 2008 7:11 pm

Turing Problem
-----------------------------------
I have created a program that asks 5 multiple choice question. It also displays the results. If you get one question right, you get one point. If I do the quiz more than once the results add up. I was wondering how you change the variable value back to 0 each time you do the quiz again.[/list]

-----------------------------------
Asherel
Fri May 09, 2008 7:13 pm

RE:Turing Problem
-----------------------------------
In your if statement set the varaible to 0.

Do this:



if answer = true then %Or however your if statement goes
     results := 0
end if


-----------------------------------
[Gandalf]
Fri May 09, 2008 7:23 pm

RE:Turing Problem
-----------------------------------
var results : int
loop
    askQuestions %results are calculated here also
    results := 0
end loop
Though the simplicity of this problem causes me to think you might be asking something else?  If not, a great place to learn all the basics is the Turing Walkthrough.  Good luck.
