|
DataMuseum.dkPresents historical artifacts from the history of: MIKADOS |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about MIKADOS Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 2528 (0x9e0) Notes: Mikados TextFile, Mikados_K Names: »FÆLLESDI«
└─⟦4cd80c18f⟧ Bits:30003895/4xCOMAL3a.imd 4 * COMAL - SPC/1 - Disketter til bogen └─⟦this⟧ »FÆLLESDI« └─⟦bcf7b34c7⟧ Bits:30003895/4xCOMAL2.imd 4 * COMAL - SPC/1 - Disketter til bogen └─⟦this⟧ »FÆLLESDI«
0010 // ----------------------- fællesdiv ---------------------- 0020 // Finder største fælles divisor til to givne tal. 0025 INTEGER N,N1,K,R,K1 0030 INPUT "Indtast to tal, større end 2: ":N,K 0040 N1:=N;K1:=K 0050 REPEAT 0060 R:=N-INT(N/K)*K 0070 N:=K;K:=R 0080 UNTIL R=0 0090 PRINT N;"er største fælles divisor til ";N1;" og ";K1