#include <cstdlib>
#include <iostream>
using namespace std;
int f(int n){
if (n==1) return 1;
else if (n==2) return 1;
else return f(n-2)+f(n-1);
}
int main(void)
{
int top=0;
for(int i=1;i<=20;i++){
cout<<"fib("<<i<<")="<<f(i)<<endl;
top+=f(i);
}
cout<<"toplam ="<<top<<endl;
system("PAUSE");
return EXIT_SUCCESS;
}
osmancanbaz
forumatornet@hotmail.com