|
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: 768 (0x300) Types: TextFile Names: »FIBONAC2.PAS«
└─⟦08ea08c61⟧ Bits:30003924 PolyPascal programmer └─ ⟦this⟧ »FIBONAC2.PAS« └─⟦092727b26⟧ Bits:30005927 Demoprogrammer til Pascal bog (Jet-80) └─ ⟦this⟧ »FIBONAC2.PAS« └─⟦3702e543b⟧ Bits:30003064 Demoprogrammer A-J til Pascal bog └─ ⟦this⟧ »FIBONAC2.PAS« └─⟦f983c2ef3⟧ Bits:30004681 Pascal opgaver (Butler) └─ ⟦this⟧ »FIBONAC2.PAS«
PROGRAM fibonac2; VAR i : INTEGER; FUNCTION fib(n : INTEGER) : INTEGER; VAR foerste, naeste, i, gem : INTEGER; BEGIN foerste := 1; naeste := 1; FOR i := 3 TO n DO BEGIN gem := naeste; naeste := foerste + naeste; foerste := gem; END; fib := naeste; END; BEGIN FOR i := 1 TO 23 DO WRITELN(' Fib(', i, ') = ', fib(i)); END. «eof»