|
|
DataMuseum.dkPresents historical artifacts from the history of: CP/M |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about CP/M Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 512 (0x200)
Types: TextFile
Names: »SFD.PAS«
└─⟦09235ab48⟧ Bits:30003065 Demoprogrammer K-Z til Pascal bog
└─⟦this⟧ »SFD.PAS«
└─⟦092727b26⟧ Bits:30005927 Demoprogrammer til Pascal bog (Jet-80)
└─⟦this⟧ »SFD.PAS«
PROGRAM sfd;
VAR
tal1, tal2 : INTEGER;
FUNCTION faelles(n, m : INTEGER) : INTEGER;
BEGIN (* faelles *)
IF m = 0
THEN faelles := n
ELSE faelles := faelles(m, n MOD m);
END; (* faelles *)
BEGIN (* sfd *)
WRITE(CLRHOM);
WRITE('Indtast 1. tal : '); READLN(tal1);
WRITE('Indtast 2. tal : '); READLN(tal2);
WRITELN('Største fælles divisor for ', tal1, ' og ', tal2, ' er ',
faelles(tal1, tal2));
END. (* sfd *)
«eof»