Example #1
0
int computeFib(int i, int n){
		if(n%100 == 0){
			printf(1, "Computing Fib Process : %d, N=%d\n", i,n);
		}

		if(n > 1){
			return computeFib(i, n-2) + computeFib(i, n-1);
		}
		else return 1;

	}
Example #2
0
int main()
{
int EV_input;
scanf("%d", &EV_input);
printf("%d\n",computeFib(EV_input));
return 0;
}
Example #3
0
int computeFib(int EV_input)
{
if ((EV_input==0))
{
return 0;
}
else
{
if ((EV_input<=2))
{
return 1;
}
else
{
return (computeFib((EV_input-1))+computeFib((EV_input-2)));
}
}
}