Console quiz like program problem
Posted: Tue Aug 23, 2005 12:14 am
I want to make a something like a quiz program, but I don't know how to avoid question repetition in console. This is example code:
and this is how I want it to look, whatever number I input (out of specified range)

Is there a command like clearconsole(), but to clear and repeat last question only (leaving all preavious questions untouched)?
Of course, my quiz will have much more than three questions so I need to solve this first
Code: Select all
If OpenConsole()
somenumber = 50
onestartshere:
ClearConsole()
Print("Question ONE is blah blah "+Str(somenumber)+": ")
qqone = Int(Val(Input()))
If qqone < 1 Or qqone > 10 : Goto onestartshere : EndIf
twostartshere:
PrintN("")
Print("Question TWO is again blah "+Str(somenumber)+": ")
qqtwo = Int(Val(Input()))
If qqtwo < 5 Or qqtwo > 15 : Goto twostartshere : EndIf
threestartshere:
PrintN("")
Print("Question THREE is some blah "+Str(somenumber)+": ")
qqthree = Int(Val(Input()))
If qqthree < 5 Or qqthree > 15 : Goto threestartshere : EndIf
PrintN("")
Print("Press ENTER to continue")
Input()
Goto onestartshere
CloseConsole()
EndIf
End

Is there a command like clearconsole(), but to clear and repeat last question only (leaving all preavious questions untouched)?
Of course, my quiz will have much more than three questions so I need to solve this first