The more usual way would be more like this...
some won't like the goto's but I am used to assembly language..long live jmp
Sync Rate 60
Backdrop Off
ink rgb(200,200,200)
`Declare a lot a variables
ProblemGen:
parta = rnd(50)
partb = rnd(50)
problem = parta + partb
MainSection:
cls
print parta;" Plus ";partb;
print " Is equal to ";
print "What?"
try:
input "My answer is ",answer
if answer = problem
print "correct ! press a key to continue..."
wait key: cls : goto ProblemGen
else
print "sorry,incorrect... to try again, hit a key" : wait key:goto MainSection
endif