100 REM   REMAINDER BY LANCE MICKLUS, INC. / BURLINGTON, VT.
120 CLS
140 RANDOMIZE TIMER
160 DIM A(40)
180 CLS : E = 0 : F = 0 : H = 0
760 PRINT "I'M YOUR FRIENDLY RADIO SHACK COMPUTER."
780 PRINT
800 INPUT "WHAT'S YOUR FIRST NAME";A$
820 INPUT "HAVE YOU PLAYED BEFORE";B$
840 IF LEFT$(B$,1)="N" THEN 940
860 CLS
880 PRINT "I'M THINKING OF A NUMBER FROM 1 TO 100."
900 GOTO 1280
920 REM     GUESS THE PLAYERS AGE TO EXPLAIN GAME.
940 CLS
960 PRINT "TELL ME SOMETHING, ";A$
980 PRINT
1000 INPUT"IF YOU DIVIDED YOUR AGE BY 3, WHAT WOULD THE REMAINDER BE";B
1020 INPUT"IF YOU DIVIDED YOUR AGE BY 5, WHAT'S THE REMAINDER";C
1040 INPUT"AND FINALLY, DIVIDING BY 7 GIVES WHAT REMAINDER";D
1060 A = 70*B+21*C+15*D
1080 IF A>105 THEN A = A - 105 : GOTO 1080
1100 PRINT : PRINT "YOU MUST BE";A;"YEARS OLD"
1120 PRINT
1140 INPUT"RIGHT";B$
1160 IF LEFT$(B$,1)="Y" THEN 1240
1180 PRINT"WELL THEN ";A$;", YOU MUST HAVE MADE A MISTAKE."
1200 GOTO 1240
1220 CLS
1240 REM     MAIN GAME ROUTINE.
1260 PRINT "NOW I'LL THINK OF A NUMBER FROM 1 TO 100."
1280 PRINT "YOU TRY TO FIGURE OUT MY NUMBER."
1300 N=INT(RND(1)*100)+1
1320 G = 1
1340 INPUT"DIVIDE MY NUMBER BY WHAT";D
1360 IF D=0 OR INT(D)<>D THEN PRINT "NOT THAT NUMBER ";A$;".":GOTO 1340
1380 IF ABS(D)<>D THEN PRINT "POSITIVE NUMBERS, O.K. ";A$;"?":GOTO 1340
1400 IF D>9 THEN PRINT"SMALLER NUMBERS PLEASE !!!" : GOTO 1340
1420 GOSUB 2380
1440 R = N - (INT(N/D)*D)
1460 PRINT G, D, R : PRINT
1480 INPUT"WHAT'S MY NUMBER";A
1500 IF A=N THEN H = H + 1 : GOTO 1800
1520 P = ((G-1)*3) : A(P) = D : A(P+1) = R : A(P+2) = A
1540 GOSUB 2380 : PRINT G, D, R, A
1560 PRINT : PRINT"WRONG !!!"
1580  G = G + 1
1600 IF G < 5 THEN 1340
1620 IF G>8 THEN F = F + 1 : GOTO 1760
1640 PRINT A$;", YOU DUMMY. AFTER";G-1;"TURNS YOU STILL HAVEN'T"
1660 PRINT "GUESSED MY NUMBER. DO YOU GIVE UP YET";
1680 INPUT B$
1700 IF LEFT$(B$,1)="N" THEN 1340
1720 E = E + 1
1740 GOSUB 2380 : PRINT
1760 PRINT "MY NUMBER WAS:";N
1780 GOTO 1820
1800 GOSUB 2380 : PRINT G, D, R, A;"CORRECT"
1820 PRINT
1840 PRINT "DO YOU WANT TO PLAY AGAIN ";A$;
1860 INPUT B$
1880 CLS : GOSUB 2240
1900 IF LEFT$(B$,1)="Y" THEN PRINT"I HAVE A NUMBER.":GOTO 1300
1920 PRINT "GOOD BYE ";A$;"!!!
1940 PRINT"IT WAS FUN PLAYING WITH YOU."
1960 :REM'
1980 REM LINK TO GAMES MONITOR
2000 REM
2020 GOTO 2580
2220 REM     PRINT SCORE CARD.
2240 PRINT : PRINT TAB(28) "SCORE"
2260 PRINT
2280 PRINT "GIVEN UP","FAILED","WON","TOTAL GAMES"
2300 PRINT E, F, H, E+F+H
2320 PRINT : PRINT : PRINT
2340 RETURN
2360 REM     PRINT HISTORY OF THE GAME.
2380 CLS
2400 PRINT "TURN","DIVISOR","REMAINDER","GUESS"
2420 IF G = 1 THEN RETURN
2440 FOR I= 0 TO (((G-1)*3)-1) STEP 3
2460 PRINT INT(I/3)+1, A(I), A(I+1), A(I+2)
2480 NEXT I
2500 RETURN
2520 END
2540 :REM'
2560 REM
2580 END
