CLS
RANDOMIZE TIMER
OPEN "sommen.txt" FOR OUTPUT AS #1
5
LET m = 3
LET r = 4
10
FOR metarondje = 1 TO m
FOR rondje = 1 TO r
LET x = INT(RND * 9) + 1
LET y = INT(RND * 9) + 1
LET z = INT(RND * 4) + 1
PRINT #1, x; " ";
IF z = 1 THEN
PRINT #1, "+ ";
END IF
IF z = 2 THEN
PRINT #1, "- ";
END IF
IF z = 3 THEN
PRINT #1, "x ";
END IF
IF z = 4 THEN
PRINT #1, ": ";
END IF
PRINT #1, y; " ";
IF z = 1 THEN
PRINT #1, "= " x + y
END IF
IF z = 2 THEN
PRINT #1, "= " x - y
END IF
IF z = 3 THEN
PRINT #1, "= " x * y
END IF
IF z = 4 THEN
PRINT #1, "= " x / y
END IF
NEXT rondje
PRINT #1, ""
NEXT metarondje
LET los = los + 1
IF los < 2 THEN
LET m = 1
LET r = 2
GOTO 10
END IF
LET los = 0
LET slag = slag + 1
IF slag < 14 THEN
PRINT #1, ""
PRINT #1, ""
GOTO 5
END IF
CLOSE #1
END