|
DataMuseum.dkPresents historical artifacts from the history of: RegneCentralen RC700 "Piccolo" |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about RegneCentralen RC700 "Piccolo" Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 512 (0x200) Types: TextFile Names: »SFD.PAS«
└─⟦09235ab48⟧ Bits:30003065 Demoprogrammer K-Z til Pascal bog └─ ⟦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»