home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
64'er
/
64ER_CD.iso
/
90xx
/
9011a.d64
/
brueche
(
.txt
)
next >
Wrap
Commodore BASIC
|
1995-03-30
|
603b
|
32 lines
10 PRINT"[147]":REM ADDITION GEMEINER BRUECHE
20 PRINT"ADDITION GEMEINER BRUECHE"
30 PRINT"*************************"
40 PRINT:GOTO130
50 REM UNTERPR. GGT
60 IFA<BTHEN S=A:A=B:B=S
70 C=A/B
80 IFC=INT(C)THENT=B:RETURN
90 R=A-INT(C)*B
100 A=B:B=R
110 IFR<>0THENT=R:GOTO70
120 RETURN
130 INPUT" 1. ZAEHLER ";Z1
140 PRINTTAB(14)"-----"
150 INPUT" 1. NENNER ";N1
160 PRINT:PRINTTAB(15)"+":PRINT
170 INPUT" 2. ZAEHLER ";Z2
180 PRINTTAB(14)"-----"
190 INPUT" 2. NENNER ";N2
200 A=N1:B=N2:GOSUB60
210 H=N1*N2/T
220 Z=H*Z1/N1+H*Z2/N2
230 A=Z:B=H:GOSUB60
240 PRINT:PRINT:PRINTTAB(6)Z;TAB(20)Z/T
250 PRINTTAB(6)"----- = -----"
260 PRINTTAB(6)H;TAB(20)H/T
270 G=INT(Z/H)
280 Z=Z/T-G*H/T
290 PRINT:PRINTTAB(20)Z
300 PRINTTAB(15)"=";G;"-----"
310 PRINTTAB(20)H/T