|  | DataMuseum.dkPresents historical artifacts from the history of: Christian Rovsing CR7, CR8 & CR16 CP/M | 
This is an automatic "excavation" of a thematic subset of
 See our Wiki for more about Christian Rovsing CR7, CR8 & CR16 CP/M Excavated with: AutoArchaeologist - Free & Open Source Software. | 
top - metrics - download
    Length: 640 (0x280)
    Types: TextFile
    Names: »PERFECT.PAS«
└─⟦6bdda2365⟧ Bits:30005253 COMPAS Pascal v2.21 til CR7
    └─⟦this⟧ »PERFECT.PAS« 
PROGRAM PERFECT;
VAR 
TAL, LAST, SUM, COUNT  :  INTEGER;
BEGIN
WRITE('INDTAST ET TAL : '); READ(TAL); WRITELN;
IF TAL = 0 THEN TAL := 1;
SUM := 0;
WHILE TAL <> SUM DO
BEGIN
	TAL := TAL+1;
	SUM := 1;
	WRITE(^M,'PRØVER ',TAL:6,'    DIVISOR       ');
	COUNT := 1;
	LAST := TAL DIV 2;
	WHILE COUNT <= LAST DO
	BEGIN
		WRITE(^Æ,'Æ5D',COUNT:5);
		COUNT := COUNT+1;
		IF  TAL = (TAL DIV COUNT)*COUNT THEN
		BEGIN
			IF SUM = 0 THEN LAST := TAL DIV COUNT;
			SUM := SUM + COUNT;
		END;
	END;
END;
WRITELN;
WRITELN('DET PERFEKTE TAL ER ',TAL);
END.
«eof»