Math Practice by gaming10th May 2006 20:19
|
---|
Summary Gives simple math problems Description Code ` This code was downloaded from The Game Creators ` It is reproduced here with full permission ` http://www.thegamecreators.com DO PRINT "Press spacebar for addition problem" suspend for key CLS PRINT "Answer the problems" A#=RND(20) PRINT A# PRINT "+" B#=RND(20) PRINT B# PRINT "Enter addition answer" INPUT ANSWER IF ANSWER=A#+B# THEN PRINT "Answer Correct" IF ANSWER<>A#+B# THEN PRINT "Answer Incorrect" PRINT "Press spacebar for subtraction problem" suspend for key CLS A#=RND(20) PRINT A# PRINT "-" B#=RND(20) PRINT B# PRINT "Enter subtraction answer(hint: remember negetive)" INPUT DIFFERENCE IF DIFFERENCE=A#-B# THEN PRINT "Difference correct" IF DIFFERENCE<>A#-B# THEN PRINT "Difference incorrect" PRINT "Press spacebar for multiplication problem" suspend for key CLS A#=RND(20) PRINT A# PRINT "*" B#=RND(20) PRINT B# PRINT "Enter multiplication answer" INPUT PRODUCT IF PRODUCT=A#*B# THEN PRINT "Product correct" IF PRODUCT<>A#*B# THEN PRINT "Product incorrect" LOOP |