Output of file : TELLTIME.BAS contained in archive : KIDSTUFF.ZIP
100 ' **** TELLTIME **** 110 ' ********************
200 ' *** Setup ***
210 '
220 DEFINT A-Z:DEFSNG P
230 KEY OFF:SCREEN 1,0,0,0:COLOR 0,1
240 PI=3.141593
250 RANDOMIZE VAL(MID\$(TIME\$,7))
260 '
270 ' *** Randomly selects time to draw ***
280 '
290 HR=RND*12 MOD 12+1
300 MIN=(HR+RND*11 MOD 11)MOD 12+1
310 '
320 ' *** Draw graphics ***
330 '
340 CLS
350 CIRCLE (230,100),2,3
360 CIRCLE (230,100),80,1
370 H=(15-HR)MOD 12
380 HANGLE!=H*-2*PI/12+(MIN+12*(MIN>6))*PI/72
390 IF HANGLE!>0 THEN HANGLE!=HANGLE!-2*PI
400 CIRCLE (230,100),50,1,HANGLE!+.02,HANGLE!-.02
410 M=(15-MIN)MOD 12
420 MANGLE!=M*-2*PI/12
430 CIRCLE (230,100),70,2,MANGLE!+.02+2*PI*(M=0),MANGLE!-.02
440 '
450 ' *** Print title of program and numbers on face ***
460 '
470 LOCATE 2,17:PRINT "TELLTIME"
480 LOCATE 4,29:PRINT "12"
490 LOCATE 5,24:PRINT "11":LOCATE 5,35:PRINT "1"
500 LOCATE 9,19:PRINT "10":LOCATE 9,39:PRINT "2"
510 LOCATE 13,19:PRINT "9":LOCATE 13,40:PRINT "3"
520 LOCATE 17,20:PRINT "8":LOCATE 17,39:PRINT "4"
530 LOCATE 21,24:PRINT "7":LOCATE 21,35:PRINT "5"
540 LOCATE 22,30:PRINT "6"
550 '
560 ' *** Randomly arranges the time choices ***
570 '
580 C=RND*3 MOD 3+1
590 CH(C)=HR
600 CM(C)=MIN
610 D=(C+RND*2 MOD 2)MOD 3+1
620 CH(D)=MIN
630 CM(D)=HR
640 E=6-C-D
650 CH(E)=HR
660 CM(E)=12-MIN
670 IF CM(E) MOD 6=0 THEN CM(E)=CM(E)+6
680 '
690 ' *** Print three possible answers ***
700 '
710 LOCATE 6,1:PRINT "What time is it ?"
720 FOR J=1 TO 3
730 LOCATE J*4+6,1
740 PRINT "("CHR\$(64+J)")";
750 GOSUB 1270
760 NEXT
770 LOCATE 24,4:PRINT "Hit Key A, B, OR C.(X TO STOP)";
780 RESP\$=INKEY\$:IF RESP\$="" THEN 790 ELSE 800
790 FOR A=1 TO 300:NEXT:SOUND 18000,.03:GOTO 780
800 LOCATE 24,1:PRINT SPC(39);
810 ANS=(ASC(RESP\$) OR 32)-96
820 IF ANS = 24 THEN 1390
830 IF ANS>0 AND ANS<4 THEN 950
840 '
850 ' *** Unacceptable input rejected ***
860 '
870 LOCATE 24,1:PRINT " A, B, OR C, PLEASE";
880 FOR J=1 TO 6
890 SOUND 50*(J MOD 2+1),5
900 NEXT
910 GOTO 770
920 '
930 ' *** Accptable input, draw eyes and mouth ***
940 '
950 CIRCLE (200,85),20,1-(ANS<>C),3*PI/8,5*PI/8
960 CIRCLE (260,85),20,1-(ANS<>C),3*PI/8,5*PI/8
970 IF ANS=C THEN 1120
980 '
990 ' *** Wrong answer routine ***
1000 '
1010 SOUND 40,40
1020 CIRCLE (230,200),80,1,(3*PI/8),(5*PI/8)
1030 LOCATE 23,1:PRINT SPC(6)CHR\$(ANS+64);" IS WRONG"
1040 PRINT "THE CORRECT ANSWER IS ";CHR\$(64+C);
1050 FOR J=1 TO 4000
1060 NEXT
1070 NUMWRONG=NUMWRONG+1
1080 GOTO 290
1090 '
1100 ' ***Right answer routine ***
1110 '
1120 LOCATE 24,1
1130 J=0
1140 FLG=0
1150 PRINT "CORRECT!!!!";
1160 CIRCLE (230,100),50,2,(10*PI/8),(14*PI/8)
1170 FOR J=1000 TO 4000 STEP 80
1180 SOUND J,.04
1190 NEXT
1200 FOR J=1 TO 2000
1210 NEXT
1220 NUMRIGHT=NUMRIGHT+1
1230 GOTO 290
1240 '
1250 *** TIME PRINTING SUBROUTINE ***
1260 '
1270 IF CM(J)=12 THEN 1340
1280 IF CM(J)<7 THEN CM5(J)=CM(J):CONNECT\$="AFTER" ELSE CM5(J)=12-CM(J):CONNECT\$ ="to"
1290 CM5\$=STR\$(CM5(J)*5)
1300 PRINT RIGHT\$(CM5\$,LEN(CM5\$)+FLG);" MINUTES ";
1310 IF NOT FLG THEN PRINT:PRINT SPC(5);
1320 PRINT CONNECT\$;CH(J);
1330 GOTO 1350
1340 PRINT CH(J);"O'CLOCK "; '2
1350 RETURN
1360 '
1370 *** ENDING PROGRAM ***
1380 '
1390 IF NUMRIGHT 1400 LOCATE 23,1:PRINT "Very good,you answered":GOTO 1420