|  | 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 - metrics - download
    Length: 512 (0x200)
    Types: TextFile
    Names: »TALFOELG.PAS«
└─⟦09235ab48⟧ Bits:30003065 Demoprogrammer K-Z til Pascal bog
    └─⟦this⟧ »TALFOELG.PAS« 
PROGRAM talfoelg;
  VAR
    a, taeller : INTEGER;
  
  BEGIN
    WRITE(CLRHOM);
    WRITE('Indtast a: ');
    READLN(a);
    taeller := 1;
    WRITE(a : 5);
    WHILE a <> 1 DO
      BEGIN
        taeller := taeller + 1;
        IF ODD(a)
          THEN a := 3 * a + 1
          ELSE a := a DIV 2;
        WRITE(a : 5);
      END;
    WRITELN;
    WRITELN('Følgen har længden ', taeller -1);
  END.
«eof»