#include <iostream>
#include <cstdio>
using namespace std;
int fibo(int n){
if(n==0) return 0;
if(n==1) return 1;
return fibo(n-1)+fibo(n-2);
}
int main()
{
int n;
while(scanf("%d",&n)==1){
printf("%d\n",fibo(n));
}
return 0;
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment