|
|
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: 1024 (0x400)
Types: TextFile
Names: »CPRNUMRE.PAS«
└─⟦3702e543b⟧ Bits:30003064 Demoprogrammer A-J til Pascal bog
└─⟦this⟧ »CPRNUMRE.PAS«
└─⟦f983c2ef3⟧ Bits:30004681 Pascal opgaver (Butler)
└─⟦this⟧ »CPRNUMRE.PAS«
PROGRAM cprnumre;
VAR
a, b, c, d, e, f, g, h, i, datosum, gsum, hsum, isum, check : INTEGER;
BEGIN
WRITE(CLRHOM);
WRITELN('De 6 første cifre i cpr-nummeret SKAL tastes ind med mellemrum');
WRITELN;
WRITELN('Indtast en dato således: D D M M Å Å');
WRITE(' '); READLN(a, b, c, d, e, f);
datosum := a * 4 + b * 3 + c * 2 + d * 7 + e * 6 + f * 5;
WRITELN;
FOR g := 0 TO 9 DO
BEGIN
gsum := datosum + g * 4;
FOR h := 0 TO 9 DO
BEGIN
hsum := gsum + h * 3;
FOR i := 0 TO 9 DO
BEGIN
isum := hsum + i * 2;
FOR check := 0 TO 9 DO
IF (isum + check) MOD 11 = 0
THEN WRITE(a, b, c, d, e, f, '-',
g, h, i, check, ' ');
END;
END;
END;
END.
«eof»