DataMuseum.dk

Presents historical artifacts from the history of:

RegneCentralen RC700 "Piccolo"

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about RegneCentralen RC700 "Piccolo"

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦591fba7d2⟧ TextFile

    Length: 640 (0x280)
    Types: TextFile
    Names: »DIVISOR.PAS«

Derivation

└─⟦3702e543b⟧ Bits:30003064 Demoprogrammer A-J til Pascal bog
    └─ ⟦this⟧ »DIVISOR.PAS« 

TextFile

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»