language: Pascal (gpc) (gpc 20070904)
date: 111 days 7 hours ago
link:
visibility: public
1
2
3
4
5
6
7
8
9
10
11
12
13
14
var n, o: integer;
 
function fib( x: integer ): integer;
 begin
  if x = 1 then fib:= 1
   else if x = 0 then fib:= 0
    else fib:= fib( x - 2 ) + fib( x - 1 )
 end;
 
begin
 readln( n );
 o:= fib( n );
 writeln( o )
end.