|  | 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 - metrics - download
    Length: 640 (0x280)
    Types: TextFile
    Names: »DIVISOR.PAS«
└─⟦092727b26⟧ Bits:30005927 Demoprogrammer til Pascal bog (Jet-80)
    └─⟦this⟧ »DIVISOR.PAS« 
PROGRAM divisor;
(* Programmet finder divisorerne i et heltal *)
  VAR
    heltal, divisor : INTEGER;
  
  BEGIN
    WRITE(CLRHOM);
    WRITE('Indtast et heltal: '); READLN(heltal);
    WRITELN(heltal, ' har følgende divisorer:');
    divisor := 2;
    REPEAT
      IF (heltal MOD divisor) = 0
        THEN
          BEGIN
            WRITE(divisor : 6);
            IF divisor <> (heltal DIV divisor)
              THEN WRITELN(heltal DIV divisor : 6);
          END;
      divisor := divisor + 1;
    UNTIL divisor > SQRT(heltal);
    WRITELN(heltal : 6);
  END.
«eof»