home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 7
/
Apprentice-Release7.iso
/
Source Code
/
Pascal
/
Applications
/
P4⁄Mac 2.0d4
/
Test programs
/
fibonacci.p
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Text File
|
1996-09-28
|
246 b
|
17 lines
|
[
TEXT/Rich
]
program fibonacci(input, output);
var i, this, last, next: integer;
begin
this:=1;
last :=1;
writeln(1, this);
writeln(2, last);
for i:=3 to 20 do begin
next := this + last;
last := this;
this := next;
writeln(i, this);
end;
end.