Program Fibonacci

Program Fibonacci;
Uses wincrt;
Procedure fibo(key:string:k:integer);
Var
x,y,z,i,v:longint;
Baris:word;
Begin
x:=1;
y:=1;
Writeln(‘*’,key,’*’);
For baris:=1 to k do
Begin
Writeln;
End;
Write(‘masukkan bilangan= ‘):readln(n);
Write(x,’ ’);
Write(y,’ ‘);
For i:=1 to n-2 do
Begin
z:=x+y;
x:=y;
y:=z;
Write(z,’ ‘);
End;
End;
end.

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

0 komentar:

Posting Komentar