DataMuseum.dk

Presents historical artifacts from the history of:

MIKADOS

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about MIKADOS

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download

⟦29f6d17b3⟧

    Length: 992 (0x3e0)
    Notes: Mikados TextFile, Mikados_K
    Names: »SUM_BRØ1«

Derivation

└─⟦92e6f589c⟧ Bits:30003895/4xCOMAL3b.imd 4 * COMAL - SPC/1 - Disketter til bogen
    └─⟦this⟧ »SUM_BRØ1« 
└─⟦faca42ef2⟧ Bits:30003895/4xCOMAL1.imd 4 * COMAL - SPC/1 - Disketter til bogen
    └─⟦this⟧ »SUM_BRØ1« 

Text

0010 // -------------------- sum_brøk_1 -----------------------
0020 // 
0030 PROC SFD(N,M)
0040 WHILE M>0 DO 
0050 REST:=N MOD M
0060 N:=M;M:=REST
0070 ENDWHILE 
0080 SFD:=N
0090 ENDPROC SFD
0100 // 
0110 PROC FORKORT(REF TÆLLER,REF NÆVNER)
0120 FAKTOR:=SFD(TÆLLER,NÆVNER)
0130 TÆLLER:=TÆLLER/FAKTOR
0140 NÆVNER:=NÆVNER/FAKTOR
0150 ENDPROC FORKORT
0160 // 
0170 CLEAR 
0171 INTEGER DIVIDEND,DIVISOR,DIVIDEND1,DIVIDEND2,DIVISOR1,DIVISOR2
0175 PRINT 
0180 INPUT "Indtast første brøks tæller og nævner:  ":DIVIDEND1,DIVISOR1
0190 INPUT "Indtast anden brøks tæller og nævner:   ":DIVIDEND2,DIVISOR2
0200 PRINT 
0210 PRINT DIVIDEND1;"/ ";DIVISOR1;"+ ";DIVIDEND2;"/ ";DIVISOR2;" = ";
0220 DIVIDEND:=DIVIDEND1*DIVISOR2+DIVIDEND2*DIVISOR1
0230 DIVISOR:=DIVISOR1*DIVISOR2
0240 // 
0250 EXEC FORKORT(DIVIDEND,DIVISOR)
0260 // 
0270 IF DIVISOR=1 THEN 
0280 PRINT DIVIDEND
0290 ELSE 
0300 PRINT DIVIDEND;"/ ";DIVISOR
0310 ENDIF 
=548 // DIVIDEND,DIVISOR)