主题:[活动]10题速算
神鬼天王
[专家分:30] 发布于 2009-09-19 12:58:00
快快
回复列表 (共1个回复)
沙发
phile [专家分:2310] 发布于 2009-09-19 13:00:00
CLS
DIM N AS LONG
J = 10
RANDOMIZE TIMER
FOR I = 1 TO 10
A = INT(90 * RND + 10)
B = INT(90 * RND + 10)
C = INT(5 * RND)
SELECT CASE C
CASE 1
PRINT A; "+"; B; "=";
INPUT N
IF A + B = N THEN FS = FS + J: PRINT "Yes!" ELSE PRINT "No!"; "da`an:"; A + B
CASE 2
PRINT A; "-"; B; "=";
INPUT N
IF A - B = N THEN FS = FS + J: PRINT "Yes!" ELSE PRINT "No!"; "da`an:"; A - B
CASE 3
PRINT A; "*"; B; "=";
INPUT N
IF A * B = N THEN FS = FS + J: PRINT "Yes!" ELSE PRINT "No!"; "da`an:"; A * B
CASE 4
PRINT A; "\"; B; "=";
INPUT N
IF A \ B = N THEN FS = FS + J: PRINT "Yes!" ELSE PRINT "No!"; "da`an:"; A \ B
CASE 5
PRINT A; "MOD"; B; "=";
INPUT N
IF A MOD B = N THEN FS = FS + 1: PRINT "Yes!" ELSE PRINT "No!"; "da`an:"; A MOD B
END SELECT
NEXT I
PRINT "ni de fen shu shi:"; FS
END
我来回复