- Wait for mouse acks properly.
[cake.git] / compiler / purify / test7.c
blobb7592786ecd5701822d857bb787958eb92ec8a1d
1 #include <stdio.h>
2 #include <stdlib.h>
4 int f (int i)
6 if (i <= 1)
7 return 1;
8 else if (i == 2)
9 return 2;
11 return f(i-1) + f(i-2);
14 int main (int argc, char ** argv)
16 int i;
18 if (argc == 1)
20 printf ("Usage: %s number\n", argv[0]);
21 return 5;
24 i = atoi (argv[1]);
26 printf ("f(%d) = %d\n", i, f(i));
28 return 0;