DataMuseum.dk

Presents historical artifacts from the history of:

Jet Computer Jet80

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

See our Wiki for more about Jet Computer Jet80

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦fd7b94cd3⟧ TextFile

    Length: 512 (0x200)
    Types: TextFile
    Names: »TALFOELG.PAS«

Derivation

└─⟦092727b26⟧ Bits:30005927 Demoprogrammer til Pascal bog (Jet-80)
    └─ ⟦this⟧ »TALFOELG.PAS« 

TextFile

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»