home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
8bitfiles.net/archives
/
archives.tar
/
archives
/
genie-commodore-file-library
/
C128Educational
/
FRACT-REDUCE
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2019-04-13
|
2KB
|
54 lines
8 DIMA$(90),C(90),AN$(15):PRINT"[147]"
9 PRINT"**************************************************"
10 PRINT"*** ***"
12 PRINT"*** PRINTING OUT FRACTION REDUCTION PROBLEMS ***"
14 PRINT"*** ***"
16 PRINT"*** THERE WILL BE 11 ROWS OF 8 PROBLEMS PER.. ***"
18 PRINT"*** ***"
24 PRINT"**************************************************"
26 PRINT:PRINT" RETURN TO CONTINUE WITH THE PRINTING [146]"
28 GETA$:IFA$=""THEN28
30 IFA$=CHR$(13)THEN38
34 GOTO200
38 OPEN4,4:CMD4
40 PRINT"REDUCE THE FOLLOWING FRACTIONS TO LOWEST TERMS:"
42 PRINT"[197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197]"
44 PRINT
50 FORI=1TO88:READA$(I):NEXT
55 FORJ=1TO11
60 FORA=1TO8
62 X%=RND(8)*88+1: Y=INT(RND(8)*6+6)
64 IFC(X%)=1THEN62
66 R(A)=VAL(LEFT$(A$(X%),1))*Y
68 R$(A)=RIGHT$(" "+STR$(R(A)),3)
70 S(A)=VAL(RIGHT$(A$(X%),1))*Y
72 S$(A)=RIGHT$(" "+STR$(S(A)),3)
74 C(X%)=1
76 AN$(J)=AN$(J)+A$(X%)+" "
78 NEXT
80 FORA=1TO8:PRINTR$(A)+" ";:NEXT
82 FORA=1TO8:PRINT"[195][195][195] = ";:NEXT
84 FORA=1TO8:PRINTS$(A)+" ";:NEXT
86 PRINT:PRINT:PRINT
90 NEXT J
92 PRINT#4:CLOSE4
95 PRINT"*** RETURN TO PRINT ANSWERS [146] ****"
97 GETA$:IFA$=""THEN97
98 IFA$=CHR$(13)THEN 105
100 GOTO200
105 OPEN4,4:CMD4
0 FOR J=1TO11
110 PRINT AN$(J):PRINT
113 NEXT J
115 PRINT#4:CLOSE4
150 DATA 1/2,2/3,3/8,3/5,3/4,5/9,1/4,3/4,1/4,7/9
155 DATA 1/3,3/4,2/9,3/7,7/8,3/8,5/6,1/5,2/5,1/5
160 DATA 1/4,2/5,3/5,5/8,4/5,4/5,6/7,1/6,5/6,1/6
165 DATA 1/5,5/6,2/7,4/9,4/7,1/2,1/2,2/3,1/5,2/3
170 DATA 1/6,2/7,5/8,7/9,7/8,5/7,1/3,3/8,1/3,3/4
175 DATA 1/2,2/3,3/8,3/5,3/4,5/9,1/4,3/4,1/4,7/9
180 DATA 1/3,3/4,2/9,3/7,7/8,3/8,5/6,1/5,2/5,1/5
185 DATA 1/4,2/5,3/4,5/8,4/5,4/5,6/7,1/6,5/6,1/6
190 DATA 1/5,5/6,2/7,4/9,4/7,1/2,1/2,2/3,1/5,2/3
200 END