|
DataMuseum.dkPresents historical artifacts from the history of: Jet Computer Jet80 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Jet Computer Jet80 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 512 (0x200) Types: TextFile Names: »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»