10 REM "DIV 1.6, COPYRIGHT 1983"
30 REM "By SmallSoft"
35 CLS$=CHR$(26):CH$=CHR$(27)
40 PRINT CHR$(26):FOR I=1 TO 7:PRINT:NEXT
50 PRINT "        WELCOME TO DIVision ";USER$
80 PRINT:PRINT "Yes, this is DIVision. In this sub-program of" 
90 PRINT "KIDMATH, you will be able to work division problems"
100 PRINT "at any of six (6) levels of hardness."
105 COMMON SEED
110 CHAIN MERGE "GRAPHIC",360,ALL
360 PRINT CHR$(26):PRINT
363 PRINT TAB(18);"LEVEL MENU
366 FOR I=1 TO 4:PRINT:NEXT
370 PRINT "      First, ";USER$;", you must state what level of "
380 PRINT "      hardness you desire from the six"
390 PRINT "      choices available. Or, you may exit back"
400 PRINT "      the original KIDMATH program."
410 PRINT
420 PRINT "        1 > LEVEL 1. (Simple whole numbers)"
430 PRINT "        2 > LEVEL 2, (Complex whole numbers)"
440 PRINT "        3 > LEVEL 3, (Complex whole numbers"
450 PRINT "                      with remainders)"
460 PRINT "        4 > LEVEL 4, (Complex decimal numbers)"
470 PRINT "        5 > LEVEL 5, (Simple fractions)"
480 PRINT "        6 > LEVEL 6, (Complex fractions)"
520 PRINT "        E > EXIT, to KIDMATH"
530 PRINT:PRINT "             TYPE in your CHOICE?";
532 H$=INPUT$(1)
534 IF H$="E" OR H$="e" THEN PRINT:PRINT:PRINT "          WAIT!! Returning to KIDMATH":CHAIN "KM",970,ALL
536 H=VAL(H$)
540 PRINT CHR$(26)
550 IF H<=0 OR H>=7 THEN PRINT CHR$(7):FOR I=1 TO 6:PRINT:NEXT I:PRINT "     The number must be between 1 and 6, or E":FOR I=1 TO 1500 :NEXT I :GOTO 360
560 PRINT CHR$(26):PRINT:PRINT:PRINT:PRINT:PRINT "Now, ";USER$;", you must pick whether you want REGULAR"
570 PRINT "DRILL or TEST for a possible REWARD."
580 PRINT:PRINT:PRINT:PRINT "         A >  REGULAR DRILL"
590 PRINT "         B >  TEST and/or REWARD (20 problems)"
600 PRINT:PRINT:PRINT "          TYPE in your CHOICE?";
605 KK$=INPUT$(1)
610 IF KK$<>"A" AND KK$<>"a" AND KK$<>"B" AND KK$<>"b" THEN PRINT CHR$(26)CHR$(7):PRINT "   Your CHOICE must be either 'A' or 'B' ONLY.":FOR I=1 TO 1500:NEXT:GOTO 560
615 IF KK$="a" THEN KK$="A" ELSE IF KK$="b" THEN KK$="B"
620 PRINT CHR$(26)
630 ON H GOTO 1000,2000,3000,4000,5000,6000
1000 REM "LEVEL 1"
1010 GOSUB 20000
1020 GOSUB 30000
1030 A=INT(RND(A)*10)
1040 B=INT(RND(B)*10)
1050 C=A*B
1060 IF A=0 OR B=0 THEN 1020
1070 IF B=0 THEN 30000
1080 PRINT CHR$(26)
1090 PRINT "PROBLEM NUMBER ";S;".":PRINT:PRINT
1100 PRINT "   ______
1110 PRINT A;")";C;"          ";C;"/";A;"="
1120 GOSUB 40000
1130 IF T=B AND KK$="A" THEN GOSUB 62400:PRINT:PRINT USER$;" Your ANSWER ";B;" is CORRECT!!!":WWW=0:R=R+1 ELSE IF T=B AND KK$="B" THEN GOSUB 63000:PRINT:PRINT USER$;" Your ANSWER ";B;" is CORRECT!!!":GOTO 1160
1140 IF WWW=2 THEN GOSUB 62300:PRINT:PRINT "SORRY!! You missed the same problem 3 times.";CHR$(10)CHR$(13);"Maybe you should START OVER or try a LOWER LEVEL.":W=W+1:PRINT:GOTO 1180
1150 IF T<>B AND WWW=0 THEN GOSUB 62100:PRINT:PRINT "SORRY!! WRONG answer. Try again.":W=W+1:WWW=WWW+1:GOTO 1090 ELSE IF WWW=1 THEN GOSUB 62200:PRINT:PRINT "SORRY!! WRONG answer. Try again.":W=W+1:WWW=WWW+1:GOTO 1090
1160 IF KK$="B" AND R=20 THEN 1180 ELSE GOSUB 50000
1170 IF X$<>"S" THEN S=S+1:GOTO 1020 ELSE PRINT CHR$(26)CHR$(7):GOTO 1160
1180 PRINT "  You had ";R;" RIGHT ANSWERS and ";W;" WRONG ANSWERS."
1190 IF KK$="A" THEN PRINT"            Press <RETURN> to CONTINUE"
1200 PRINT " Press L for new LEVEL, A for new AREA,  Q to QUIT";
1205 Y$=INPUT$(1):IF Y$=CHR$(13) THEN 620 ELSE IF Y$="L" OR Y$="l" THEN 360 ELSE IF Y$="Q" OR Y$="q" THEN SYSTEM ELSE SEED=SEED+1:COMMON SEED:CHAIN "KM",970,ALL
1260 END
2000 REM "LEVEL 2"
2010 GOSUB 20000
2020 GOSUB 30000
2030 A=INT(RND(A)*100)
2040 B=INT(RND(B)*100)
2050 FOR I=1 TO 3
2060 IF A<10 THEN A=A*10
2070 IF B<10 THEN B=B*10
2080 NEXT
2085 IF A>10 THEN A=3+INT(A/10)
2090 C=A*B
2100 D=A*(INT(B/10))
2110 E=A*(B-(INT(B*10))/10)
2120 PRINT CHR$(26)
2130 PRINT "PROBLEM NUMBER ";S;".":PRINT:PRINT
2140 PRINT "      _______"
2150 PRINT "  ";
2160 PRINT USING N$;A;
2170 PRINT " )";
2180 PRINT USING O$;C;
2190 PRINT "          ";
2200 PRINT USING O$;C;
2210 PRINT "/";
2220 PRINT USING N$;A
2230 GOSUB 40000
2240 IF T=B AND KK$="A" THEN GOSUB 62400:PRINT:PRINT USER$;" Your ANSWER ";B;" is CORRECT!!!":PRINT:WWW=0:R=R+1:GOTO 2270 ELSE IF T=B AND KK$="B" THEN GOSUB 63000:PRINT:PRINT USER$;" Your ANSWER ";B;" is CORRECT!!!":GOTO 2440
2250 IF WWW=2 THEN GOSUB 62300:PRINT:PRINT "SORRY!! You missed the same problem 3 times.";CHR$(10)CHR$(13);"Maybe you should START OVER or try a LOWER LEVEL.":W=W+1:PRINT:GOTO 2270
2260 IF T<>B AND WWW=0 THEN GOSUB 62100:PRINT:PRINT "SORRY!! WRONG answer. Try again.":W=W+1:WWW=WWW+1:GOTO 2130 ELSE IF T<>B AND WWW=1 THEN GOSUB 62200:PRINT:PRINT "SORRY!! WRONG answer. Try again.":W=W+1:WWW=WWW+1:GOTO 2130
2270 PRINT "     ";
2280 PRINT USING N$;B
2290 PRINT "   _______
2300 PRINT USING N$;A;
2310 PRINT ")";
2320 PRINT USING O$;C
2330 PRINT "  ";
2340 PRINT USING P$;D
2350 PRINT "   ____"
2360 PRINT "   ";
2370 PRINT USING P$;C-(D*10)
2380 PRINT "   ";
2390 PRINT USING P$;C-(D*10)
2400 PRINT "    ___"
2410 PRINT "   ";
2420 PRINT USING P$;0
2430 IF WWW=2 THEN PRINT:GOTO 1180
2440 IF KK$="B" AND R=20 THEN 1180 ELSE GOSUB 50000
2450 IF X$<>"S" THEN S=S+1:GOTO 2020 ELSE PRINT CHR$(26)CHR$(7):GOTO 2440
3000 REM "LEVEL 3"
3010 GOSUB 20000
3020 GOSUB 30000
3030 A=INT(RND(A)*10)
3040 B=INT(RND(B)*100)
3050 FOR I=1 TO 3
3060 IF A<1 THEN A=A*10
3070 IF B<10 THEN B=B*10
3080 NEXT
3090 C=A*B
3100 C=C+INT(RND(A)*10)
3110 D=A*INT(B/10)
3120 E=C-(D*10)
3130 F=A*(B-(INT(B/10)*10))
3140 G=E-F
3150 IF G>=A THEN 3020
3160 PRINT CHR$(26)
3170 PRINT "PROBLEM NUMBER ";S;".":PRINT:PRINT
3180 PRINT "         _____"
3190 PRINT "       ";
3200 PRINT USING N$;A;
3210 PRINT ")";
3220 PRINT USING P$;C
3230 PRINT:PRINT "Your ANSWER will be in TWO PARTS."
3240 PRINT "TYPE in your ANSWER and REMAINDER"
3250 INPUT "SEPARATED by a COMMA (,) (EXAMPLE  34,3)";T,U
3260 PRINT:IF T=B AND U=G AND KK$="A" THEN GOSUB 62400:PRINT:PRINT "Your ANSWER";B;"with a REMAINDER OF";G;"is CORRECT ";USER$;" !!!":PRINT:WWW=0:R=R+1:GOTO 3310
3270 IF T=B AND U=G AND KK$="B" THEN GOSUB 63000:PRINT:PRINT "Your ANSWER";B;"with a REMAINDER of";G;"IS CORRECT ";USER$;" !!!":GOTO 3550
3280 IF WWW=2 THEN GOSUB 62300:PRINT:PRINT "SORRY!! You missed the same problem 3 times.";CHR$(10)CHR$(13);"Maybe you should START OVER or try a LOWER LEVEL.":W=W+1:PRINT:GOTO 3310
3290 IF T<>B OR U<>G THEN WWW=WWW+1:W=W+1
3300 IF WWW=1 THEN GOSUB 62100:PRINT:PRINT "SORRY!! WRONG answer. Try again.":GOTO 3170 ELSE IF WWW=2 THEN GOSUB 62200:PRINT:PRINT "SORRY!! WRONG answer. Try again.":GOTO 3170
3310 PRINT "          ";
3320 PRINT USING P$;B;
3330 PRINT "  Remainder";G
3340 PRINT "         _____            ^"
3350 PRINT "       ";
3360 PRINT USING N$;A;
3370 PRINT ")";
3380 PRINT USING P$;C;
3390 PRINT "            |"
3400 PRINT "           ";
3410 PRINT USING N$;D;
3420 PRINT "             |"
3430 PRINT "           ___            |"
3440 PRINT "            ";
3450 PRINT USING N$;E;
3460 PRINT "            |"
3470 PRINT "            ";
3480 PRINT USING N$;F;
3490 PRINT "            |"
3500 PRINT "            __            |"
3510 PRINT "            ";
3520 PRINT USING N$;G;
3530 PRINT " ------------"
3540 IF WWW=2 THEN PRINT:GOTO 1180
3550 IF KK$="B" AND R=20 THEN 1180 ELSE GOSUB 50000
3560 IF X$<>"S" THEN S=S+1:GOTO 3020 ELSE PRINT CHR$(26)CHR$(7):GOTO 3550
4000 REM "LEVEL 4"
4010 GOSUB 20000
4020 GOSUB 30000
4030 A=(INT(RND(A)*1000))/100
4040 B=(INT(RND(B)*1000))/100
4050 FOR I=1 TO 3
4060 IF A<10 AND A>9 THEN A=A*9
4070 IF A<9  THEN A=A*9
4080 IF B<10 AND B>9 THEN B=B*9
4090 IF B<9 THEN B=B*9
4100 NEXT
4110 A=(INT(A*10))/10
4120 B=(INT(B*10))/10
4130 Q$="##.#"
4140 R$="#####.##"
4150 S$="####"
4160 C=A*B
4170 C=(INT(C*100))/100
4180 D=(A*10)*(INT(B/10))
4190 E=(INT(C*10))-(D*10)
4200 F=(A*10)*INT(B-(INT(B/10))*10)
4210 G=(A*10)*((B-INT(B))*10)
4220 H=0
4230 PRINT CHR$(26)
4240 PRINT "PROBLEM NUMBER ";S;".":PRINT:PRINT
4250 PRINT "       _________"
4260 PRINT "  ";
4270 PRINT USING Q$;A;
4280 PRINT " )";
4290 PRINT USING R$;C;
4300 PRINT "          ";
4310 PRINT USING R$;C;
4320 PRINT "/";
4330 PRINT USING Q$;A
4340 GOSUB 40000
4350 PRINT:IF T=B AND KK$="A" THEN GOSUB 62400:PRINT:PRINT USER$;" Your ANSWER ";B;" is CORRECT!!!":WWW=0:R=R+1:GOTO 4380 ELSE IF T=B AND KK$="B" THEN GOSUB 63000:PRINT:PRINT USER$;" Your ANSWER ";B;" is CORRECT!!!":GOTO 4600
4360 IF WWW=2 THEN GOSUB 62300:PRINT:PRINT "SORRY!! You missed the same problem 3 times.";CHR$(10)CHR$(13);"Maybe you should START OVER or try a LOWER LEVEL.":W=W+1:PRINT:GOTO 4380
4370 IF T<>B AND WWW=0 THEN GOSUB 62100:PRINT:PRINT "SORRY!! WRONG answer. Try again.":W=W+1:WWW=WWW+1:GOTO 4240 ELSE IF T<>B AND WWW=1 THEN GOSUB 62200:PRINT:PRINT "SORRY!! WRONG answer. Try again.":W=W+1:WWW=WWW+1:GOTO 4240
4380 PRINT:PRINT "         ";
4390 PRINT USING Q$;B
4400 PRINT "     __________
4410 PRINT USING P$;A*10;
4420 PRINT " )";
4430 PRINT USING R$;C*10
4440 PRINT "      ";
4450 PRINT USING P$;D
4460 PRINT "       ____"
4470 PRINT "       ";
4480 PRINT USING P$;E
4490 PRINT "       ";
4500 PRINT USING P$;F
4510 PRINT "        ____"
4520 PRINT "        ";
4530 PRINT USING P$;G
4540 PRINT "        ";
4550 PRINT USING P$;G
4560 PRINT "        ____"
4570 PRINT "        ";
4580 PRINT USING P$;0
4590 IF WWW=2 THEN PRINT:GOTO 1180
4600 IF KK$="B" AND R=20 THEN 1180 ELSE GOSUB 50000
4610 IF X$<>"S" THEN S=S+1:GOTO 4020 ELSE PRINT CHR$(26)CHR$(7):GOTO 4600
5000 REM "LEVEL 5"
5010 GOSUB 20000
5020 RESTORE:READ A,B,C,D
5030 A=INT(RND(A)*1000):B=INT(RND(B)*1000):C=INT(RND(C)*1000):D=INT(RND(D)*1000)
5040 IF A=0 OR B=0 OR C=0 OR D=0 THEN 5020
5050 FOR I=1 TO 5
5060 IF A>=10 THEN A=INT(A/10)
5070 IF B>=10 THEN B=INT(B/10)
5080 IF C>=10 THEN C=INT(C/10)
5090 IF D>=10 THEN D=INT(D/10)
5100 NEXT I
5110 IF A>B THEN SWAP A,B
5120 IF C>D THEN SWAP C,D
5130 E=A*D
5140 F=B*C
5150 IF E=F THEN 5020
5160 Y=E:Z=F
5170 J=9
5180 WHILE J>=1
5190 FOR K=1 TO 3
5200 IF E/J=INT(E/J) AND F/J=INT(F/J) THEN E=E/J:F=F/J:G=E:H=F
5210 NEXT K
5220 J=J-1
5230 WEND
5240 IF G/H=INT(G/H) THEN 5020
5250 O=INT(G/H)
5260 P=G-(O*H)
5270 PRINT CHR$(26)
5280 PRINT "PROBLEM NUMBER ";S;".":PRINT
5290 PRINT "    ";A;"   ";C
5300 PRINT "    ___ % ___  =   NOTE: % = The DIVision symbol."
5310 PRINT "    ";B;"   ";D
5320 PRINT:PRINT "Your ANSWER will be in THREE PARTS, each SEPARATED
5330 PRINT "by a COMMA ','. First ENTER the WHOLE NUMBER"
5340 PRINT "(0 if NONE), then the NUMERATOR and finally the
5350 PRINT "DENOMINATOR.                                15
5360 PRINT "(EXAMPLE: 3,15,16 would be entered for  3  ___ )"
5370 PRINT "                                            16"
5380 PRINT:PRINT "Be sure to REDUCE your ANSWER to the LOWEST form"
5390 PRINT "POSSIBLE."
5400 PRINT:INPUT "Do this NOW! (Then press RETURN/ENTER)";T,U,V
5410 PRINT: IF T=O AND U=P AND V=H AND KK$="A" THEN GOSUB 62400:PRINT:PRINT "Your WHOLE NUMBER";T;"NUMERATOR";U;"and DENOMINATOR";V;CHR$(10)CHR$(13);"are all CORRECT ";USER$;" !!":R=R+1:WWW=0:GOTO 5480
5420 PRINT: IF T=O AND U=P AND V=H AND KK$="B" THEN GOSUB 63000:PRINT:PRINT "Your WHOLE NUMBER";T;"NUMERATOR";U;"and DENOMINATOR";V;CHR$(10)CHR$(13);"are all CORRECT ";USER$;" !!":GOTO 5790
5430 IF WWW=2 THEN GOSUB 62300:PRINT:PRINT "SORRY!! You missed the same problem 3 times. Look";CHR$(10)CHR$(13);"at the right answer.":PRINT:W=W+1:PRINT:GOTO 5480 
5440 IF T<>O OR U<>P OR V<>H THEN W=W+1:WWW=WWW+1
5450 IF WWW=1 THEN GOSUB 62100:PRINT:PRINT "SORRY!! WRONG answer. Try again." ELSE IF WWW=2 THEN GOSUB 62200:PRINT:PRINT "SORRY!! WRONG answer. Try again."
5460 IF T=0 AND U=Y AND V=Z AND Z<>H THEN PRINT "Your NUMERATOR";Y;"and DENOMINATOR";Z;"are CORRECT,";CHR$(10)CHR$(13);"but you DID NOT REDUCE far enough.":PRINT:GOTO 5280
5470 IF T=0 AND U=G AND V=H AND G>H THEN PRINT "Your NUMERATOR";G;"and DENOMINATOR";H;"are CORRECT,";CHR$(10)CHR$(13);"but you forgot to MAKE your ANSWER a WHOLE ";CHR$(10)CHR$(13);"NUMBER and FRACTION.":PRINT:GOTO 5280 ELSE GOTO 5280
5480 PRINT
5490 PRINT USING M$;A;
5500 PRINT "   ";
5510 PRINT USING M$;C;
5520 PRINT "   ";
5530 PRINT USING M$;A;
5540 PRINT "   ";
5550 PRINT USING M$;D;
5560 PRINT "    ";
5570 PRINT USING N$;Y;
5580 PRINT "     ";
5590 PRINT USING N$;G;
5600 PRINT "        ";
5610 PRINT USING N$;P
5620 PRINT "_ % _ = _ x _ = ___ or ___ or  ";
5630 PRINT USING N$;O;
5640 PRINT " __"
5650 PRINT USING M$;B;
5660 PRINT "   ";
5670 PRINT USING M$;D;
5680 PRINT "   ";
5690 PRINT USING M$;B;
5700 PRINT "   ";
5710 PRINT USING M$;C;
5720 PRINT "    ";
5730 PRINT USING N$;Z;
5740 PRINT "     ";
5750 PRINT USING N$;H;
5760 PRINT "        ";
5770 PRINT USING N$;H
5780 IF WWW=2 THEN PRINT:PRINT:GOTO 1180
5790 IF KK$="B" AND R=20 THEN 1180 ELSE GOSUB 50000
5800 IF X$<>"S" THEN S=S+1:GOTO 5020 ELSE PRINT CHR$(26)CHR$(7):GOTO 5790
6000 REM "LEVEL 6"
6010 GOSUB 20000
6020 RESTORE:READ A,B,C,D
6030 A=INT(RND(A)*1000):B=INT(RND(B)*1000):C=INT(RND(C)*1000):D=INT(RND(D)*1000)
6040 IF A=0 OR B=0 OR C=0 OR D=0 THEN 6020
6050 FOR I=1 TO 5
6060 IF A>=100 THEN A=INT(A/10)
6070 IF B>=100 THEN B=INT(B/10)
6080 IF C>=100 THEN C=INT(C/10)
6090 IF D>=100 THEN D=INT(D/10)
6100 NEXT I
6110 IF A>B THEN SWAP A,B
6120 IF C>D THEN SWAP C,D
6130 E=A*D
6140 F=B*C
6150 IF E=F THEN 6020
6160 Y=E:Z=F
6170 J=9
6180 WHILE J>=1
6190 FOR K=1 TO 4
6200 IF E/J=INT(E/J) AND F/J=INT(F/J) THEN E=E/J:F=F/J:G=E:H=F
6210 NEXT K
6220 J=J-1
6230 WEND
6240 IF G/H=INT(G/H) THEN 6020
6250 O=INT(G/H)
6260 P=G-(O*H)
6270 PRINT CHR$(26)
6280 PRINT "PROBLEM NUMBER ";S;".":PRINT
6290 PRINT "    ";A;"    ";C
6300 PRINT "    ___  %  ___  =   NOTE: % = The DIVision symbol."
6310 PRINT "    ";B;"    ";D
6320 PRINT:PRINT "Your ANSWER will be in THREE PARTS, each SEPARATED
6330 PRINT "by a COMMA ','. First ENTER the WHOLE NUMBER"
6340 PRINT "(0 if NONE), then the NUMERATOR and FINALLY the
6350 PRINT "DENOMINATOR.                                15
6360 PRINT "(EXAMPLE: 3,15,16 would be entered for  3  ___ )"
6370 PRINT "                                            16"
6380 PRINT:PRINT "Be sure to REDUCE your ANSWER to the LOWEST form"
6390 PRINT "POSSIBLE."
6400 PRINT:INPUT "Do this NOW! (Then press RETURN/ENTER)";T,U,V
6410 PRINT: IF T=O AND U=P AND V=H AND KK$="A" THEN GOSUB 62400:PRINT:PRINT "Your WHOLE NUMBER";T;"NUMERATOR";U;"and DENOMINATOR";V;CHR$(10)CHR$(13);"are all CORRECT ";USER$;" !!":R=R+1:WWW=0:GOTO 6480
6420 PRINT:IF T=O AND U=P AND V=H AND KK$="B" THEN GOSUB 63000:PRINT:PRINT "Your WHOLE NUMBER";T;"NUMERATOR";U;"and DENOMINATOR";V;CHR$(10)CHR$(13);"are all CORRECT ";USER$;" !!":GOTO 6790
6430 IF WWW=2 THEN GOSUB 62300:PRINT:PRINT "SORRY!! You missed the same problem 3 times. Look";CHR$(10)CHR$(13);"at the right answer.":PRINT:W=W+1:PRINT:GOTO 6480 
6440 IF T<>O OR U<>P OR V<>H THEN W=W+1:WWW=WWW+1
6450 IF WWW=1 THEN GOSUB 62100:PRINT:PRINT "SORRY!! WRONG answer. Try again." ELSE IF WWW=2 THEN GOSUB 62200:PRINT:PRINT "SORRY!! WRONG answer. Try again."
6460 IF T=0 AND U=Y AND V=Z AND Z<>H THEN PRINT "Your NUMERATOR";Y;"and DENOMINATOR";Z;"are CORRECT,";CHR$(10)CHR$(13);"but you DID NOT REDUCE far enough.":PRINT:GOTO 6280
6470 IF T=0 AND U=G AND V=H AND G>H THEN PRINT "Your NUMERATOR";G;"and DENOMINATOR";H;"are CORRECT,";CHR$(10)CHR$(13);"but you forgot to MAKE your ANSWER a WHOLE ";CHR$(10)CHR$(13);"NUMBER and FRACTION.":PRINT:GOTO 6280 ELSE GOTO 6280
6480 PRINT
6490 PRINT USING N$;A;
6500 PRINT "   ";
6510 PRINT USING N$;C;
6520 PRINT "   ";
6530 PRINT USING N$;A;
6540 PRINT "   ";
6550 PRINT USING N$;D;
6560 PRINT "    ";
6570 PRINT USING P$;Y;
6580 PRINT "      ";
6590 PRINT USING P$;G;
6600 PRINT "         ";
6610 PRINT USING P$;P
6620 PRINT "__ % __ = __ x __  = ____  or  ____  or";
6630 PRINT USING P$;O;
6640 PRINT " ____"
6650 PRINT USING N$;B;
6660 PRINT "   ";
6670 PRINT USING N$;D;
6680 PRINT "   ";
6690 PRINT USING N$;B;
6700 PRINT "   ";
6710 PRINT USING N$;C;
6720 PRINT "    ";
6730 PRINT USING P$;Z;
6740 PRINT "      ";
6750 PRINT USING P$;H;
6760 PRINT "         ";
6770 PRINT USING P$;H
6780 IF WWW=2 THEN PRINT:PRINT:GOTO 1180
6790 IF KK$="B" AND R=20 THEN 1180 ELSE GOSUB 50000
6800 IF X$<>"S" THEN S=S+1:GOTO 6020 ELSE PRINT CHR$(26)CHR$(7):GOTO 6790
7000 GOTO 360
8000 GOTO 360
9000 GOTO 360
10000 REM "DATA"
10010 DATA 1,2,3,4,5,6,7,8,9,1,2,3,4,5,6,7,8,9
10020 DATA 1,2,3,4,5,6,7,8,9,1,2,3,4,5,6,7,8,9,-999
20000 RANDOMIZE SEED
20040 R=0
20050 W=0
20060 WWW=0
20070 S=1
20080 M$="#":N$="##":O$="####.##":P$="####":Q$="###.#":R$="#####.##"
20090 RETURN
30000 RESTORE:READ A,B
30010 IF A=-999 OR B=-999 THEN PRINT CHR$(26):PRINT "OUT OF DATA FOR PROBLEM GENERATION":PRINT CHR$(26):GOTO 1180
30020 RETURN
40000 PRINT:PRINT:INPUT "TYPE in your ANSWER, then press RETURN/ENTER";T:RETURN 
50000 PRINT:PRINT "Press S for SCORE, ANY other key to CONTINUE?";
50005 X$=INPUT$(1)
50010 IF X$="S" OR X$="s" THEN PRINT CHR$(26):GOTO 1180 ELSE RETURN
 SCORE, ANY other key to CONTINUE?";
50005 X$=INPUT$(1)
