mirror of
https://github.com/rfivet/BCG101.git
synced 2024-12-21 01:26:24 -05:00
69 lines
1.8 KiB
QBasic
69 lines
1.8 KiB
QBasic
10 REM-MATHDICE*** (BASIC PROGRAM BEGINS AT LINE 100) WAS PROGRAMMED
|
|
11 REM-BY JIM GERRISH, FOURTH GRADE TEACHER AT THE BERNICE A. RAY
|
|
12 REM-SCHOOL, HANOVER, NEW HAMPSHIRE. LAST CHANGE: 3/21/72.
|
|
13 REM
|
|
14 REM-PROGRAM PERFORMS PICTORIAL DRILL ON ADDITION FACTS USING
|
|
15 REM-PRINTED DICE, NO READING INVOLVED. GOOD FOR BEGINNING
|
|
16 REM-ADDITION, SINCE ANSWER CAN BE DERIVED FROM COUNTING SPOTS
|
|
17 REM-DICE AS WELL AS BY MEMORIZING MATH FACTS OR AWARENESS
|
|
18 REM-OF NUMBER CONCEPTS.
|
|
19 REM-
|
|
20 PRINT"THIS PROGRAM GENERATES SUCCESSIVE PICTURES OF TWO DICE."
|
|
21 PRINT"WHEN TWO DICE AND AN EQUAL SIGN FOLLOWED BY A QUESTION"
|
|
22 PRINT"MARK HAVE BEEN PRINTED, TYPE YOUR ANSWER AND THE RETURN KEY."
|
|
23 PRINT"TO CONCLUDE THE LESSON, TYPE CTRL/C AS YOUR ANSWER."
|
|
24 PRINT
|
|
25 PRINT
|
|
100 RANDOMIZE
|
|
105 LET N=N+1
|
|
110 LET D=INT(RND(0)*6+1)
|
|
120 PRINT ".-----."
|
|
130 IF D=1 THEN 200
|
|
140 IF D=2 THEN 180
|
|
150 IF D=3 THEN 180
|
|
160 PRINT "I * * I"
|
|
170 GOTO 210
|
|
180 PRINT "I * I"
|
|
190 GOTO 210
|
|
200 PRINT "I I"
|
|
210 IF D=2 THEN 260
|
|
220 IF D=4 THEN 260
|
|
230 IF D=6 THEN 270
|
|
240 PRINT "I * I"
|
|
250 GOTO 280
|
|
260 PRINT "I I"
|
|
265 GOTO 280
|
|
270 PRINT "I * * I"
|
|
280 IF D=1 THEN 350
|
|
290 IF D=2 THEN 330
|
|
300 IF D=3 THEN 330
|
|
310 PRINT "I * * I"
|
|
320 GOTO 360
|
|
330 PRINT "I * I"
|
|
340 GOTO 360
|
|
350 PRINT "I I"
|
|
360 PRINT ".-----."
|
|
370 PRINT
|
|
375 IF N=2 THEN 500
|
|
380 PRINT " +"
|
|
381 PRINT
|
|
400 LET A=D
|
|
410 GOTO 100
|
|
500 LET T=D+A
|
|
510 PRINT " = ";
|
|
520 INPUT T1
|
|
530 IF T1=T THEN 590
|
|
540 PRINT "NO, COUNT THE SPOTS AND GIVE ANOTHER ANSWER."
|
|
541 PRINT " = ";
|
|
550 INPUT T2
|
|
560 IF T2=T THEN 590
|
|
570 PRINT "NO, THE ANSWER IS ";T
|
|
580 GOTO 600
|
|
590 PRINT "RIGHT!"
|
|
600 PRINT
|
|
601 PRINT "THE DICE ROLL AGAIN....."
|
|
610 PRINT
|
|
615 LET N=0
|
|
620 GOTO 100
|
|
900 END
|