cleanup patch
[AROS.git] / compiler / purify / test7.c
blob5b22236916e2de7d9b56d16d005f322b64ec2d5a
1 /*
2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <stdio.h>
7 #include <stdlib.h>
9 int f (int i)
11 if (i <= 1)
12 return 1;
13 else if (i == 2)
14 return 2;
16 return f(i-1) + f(i-2);
19 int main (int argc, char ** argv)
21 int i;
23 if (argc == 1)
25 printf ("Usage: %s number\n", argv[0]);
26 return 5;
29 i = atoi (argv[1]);
31 printf ("f(%d) = %d\n", i, f(i));
33 return 0;