repo.or.cz
/
cake.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
- Wait for mouse acks properly.
[cake.git]
/
compiler
/
purify
/
test7.c
blob
b7592786ecd5701822d857bb787958eb92ec8a1d
1
#include <stdio.h>
2
#include <stdlib.h>
3
4
int
f
(
int
i
)
5
{
6
if
(
i
<=
1
)
7
return
1
;
8
else if
(
i
==
2
)
9
return
2
;
10
11
return
f
(
i
-
1
) +
f
(
i
-
2
);
12
}
13
14
int
main
(
int
argc
,
char
**
argv
)
15
{
16
int
i
;
17
18
if
(
argc
==
1
)
19
{
20
printf
(
"Usage: %s number
\n
"
,
argv
[
0
]);
21
return
5
;
22
}
23
24
i
=
atoi
(
argv
[
1
]);
25
26
printf
(
"f(%d) = %d
\n
"
,
i
,
f
(
i
));
27
28
return
0
;
29
}