12 lines
129 B
Perl
12 lines
129 B
Perl
|
sub fib{
|
||
|
my $n = $_[0];
|
||
|
if($n < 3){
|
||
|
return 1;
|
||
|
}
|
||
|
else{
|
||
|
return fib($n-1) + fib($n-2);
|
||
|
}
|
||
|
};
|
||
|
|
||
|
&fib(34);
|