Program FIBONACII;
Uses Crt;
Var n,kq:integer;
Function F(n:integer):integer;
Begin
If (n=1) or (n=2) then
F:=1
Else
F:=F(n-1)+F(n-2);
End;
Begin
Clrscr;
Writeln(' TINH SO FIBONACII:');
Writeln('-------------------------------');
Write('Nhap n = '); Readln(n);
Write('F(',n,')= ',f(n));
Readln;
End.
Ý kiến bạn đọc
Những tin cũ hơn