Jumat, 16 Desember 2011

Program Deret Fibonacci


PROGRAM DERET FIBONACCI;
uses wincrt;
var a,b,c,i,n: integer;
begin
write('masukkan n = ‘);
readln(n);
a:=1; b:=0;
for i:=1 to n do
begin
c:=a+b;
a:=b;
b:=c;
write(c,' ,');
end;
end.


Tidak ada komentar:

Posting Komentar