|
DataMuseum.dkPresents historical artifacts from the history of: CP/M |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about CP/M Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 512 (0x200) Types: TextFile Names: »TALFOELG.PAS«
└─⟦08ea08c61⟧ Bits:30003924 PolyPascal programmer └─ ⟦this⟧ »TALFOELG.PAS« └─⟦09235ab48⟧ Bits:30003065 Demoprogrammer K-Z til Pascal bog └─ ⟦this⟧ »TALFOELG.PAS« └─⟦092727b26⟧ Bits:30005927 Demoprogrammer til Pascal bog (Jet-80) └─ ⟦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»