repo.or.cz
/
ruby-svn.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
* io.c (rb_open_file): encoding in mode string was ignored if perm is
[ruby-svn.git]
/
sample
/
fib.pl
blob
945a4929a79e371b1c3d3c7be3559e163292ef81
1
sub
fib
{
2
my
(
$n
)=
@_
;
3
if
(
$n
<
2
) {
4
return
$n
;
5
}
6
else
{
7
return
fib
(
$n
-
2
)+
fib
(
$n
-
1
);
8
}
9
}
10
11
print
fib
(
20
),
"
\n
"
;