MATHS TEST
SHARPEN your mental arithmetic with Maths Test for the 1K ZX-81 by David Steel of Beith, Ayrshire. The program will ask you to do a number of sums, telling you the correct answer if you are wrong.
The graphics at lines 50 and 60 print a large question mark on the screen. Notice also that at line 100 the random numbers chosen by the computer for the sums must be printed as whole numbers by using the INT function. If you want to change the sums to subtraction or other operations, change the plus sign in lines 100 and 105 to the appropriate symbol.
10 CLS
50 PRINT AT 4,20;"\..\. ";AT 5,19;"\ : \ :";AT 6,21;"\.'"
60 PRINT AT 7,20;"\ :";AT 8,20;"\ :";AT 9,20;"\ ."
80 PRINT AT 4,1;"QUESTION: "
90 LET A=RND*376
91 LET B=RND*159
100 PRINT AT 20,0;INT A;"+";INT B
105 LET D=INT A+INT B
110 FOR F=1 TO 250
111 IF INKEY$<>"" THEN GOTO 200
112 NEXT F
130 PRINT AT 15,10;"TIME UP"
140 GOTO 222
200 PRINT AT 20,0;" "
205 INPUT A
210 IF A=D THEN PRINT AT 15,10;"CORRECT"
220 IF A<>D THEN PRINT AT 15,10;"TWIT,WRONG"
222 PRINT AT 20,20;"ANSWER=";D
225 PAUSE 300
230 GOTO 1
SINCLAIR USER September 1984
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.