主题:【求助】急急急......(60分悬赏)
这是我编的数学题目程序,可是生成EXE后总是出错,一会说输入一个码什么,一会我用计算器算了每道题的数据,应该是100分,可出一个0分。帮忙修改程序。
CLS
INPUT "Start or End "; a$
IF a$ = "Start" OR a$ = "start" OR a$ = "START" THEN
PRINT "10 test ?(A)"
PRINT "20 test ?(B)"
PRINT "100 test ?(C)"
INPUT "test number "; n
js = 0
IF n = 10 OR n = 20 OR n = 100 THEN
FOR i = 1 TO n
RANDOMIZE TIMER
a = INT(RND * 30) + 1
RANDOMIZE TIMER
b = INT(RND * 30) + 1
RANDOMIZE TIMER
c = INT(RND * 4) + 1
IF c = 1 THEN
zhengque = a + b
PRINT a; "+"; b; "=";
INPUT x
IF zhengque = x THEN
js = js + 100 / n
END IF
ELSEIF c = 2 THEN
IF a < b THEN SWAP a, b
zhengque = a - b
PRINT a; "-"; b; "=";
INPUT x
IF zhengque = x THEN
js = js + 100 / n
END IF
ELSEIF c = 3 THEN
zhengque = a * b
PRINT a; "*"; b; "=";
INPUT x
IF zhengque = x THEN
js = js + 100 / n
END IF
ELSE
zhengque = a MOD b
PRINT a; "MOD"; b; "=";
INPUT x
IF zhengque = x THEN
js = js + 100 / n
END IF
END IF
NEXT i
END IF
PRINT "Score"; js
END IF
SLEEP
END
CLS
INPUT "Start or End "; a$
IF a$ = "Start" OR a$ = "start" OR a$ = "START" THEN
PRINT "10 test ?(A)"
PRINT "20 test ?(B)"
PRINT "100 test ?(C)"
INPUT "test number "; n
js = 0
IF n = 10 OR n = 20 OR n = 100 THEN
FOR i = 1 TO n
RANDOMIZE TIMER
a = INT(RND * 30) + 1
RANDOMIZE TIMER
b = INT(RND * 30) + 1
RANDOMIZE TIMER
c = INT(RND * 4) + 1
IF c = 1 THEN
zhengque = a + b
PRINT a; "+"; b; "=";
INPUT x
IF zhengque = x THEN
js = js + 100 / n
END IF
ELSEIF c = 2 THEN
IF a < b THEN SWAP a, b
zhengque = a - b
PRINT a; "-"; b; "=";
INPUT x
IF zhengque = x THEN
js = js + 100 / n
END IF
ELSEIF c = 3 THEN
zhengque = a * b
PRINT a; "*"; b; "=";
INPUT x
IF zhengque = x THEN
js = js + 100 / n
END IF
ELSE
zhengque = a MOD b
PRINT a; "MOD"; b; "=";
INPUT x
IF zhengque = x THEN
js = js + 100 / n
END IF
END IF
NEXT i
END IF
PRINT "Score"; js
END IF
SLEEP
END