You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
#include<stdio.h>
|
|
|
|
|
|
|
|
|
|
int fibonacci(int n)
|
|
|
|
|
{
|
|
|
|
|
if(n<=1)
|
|
|
|
|
return 1;
|
|
|
|
|
return fibonacci(n-1)+fibonacci(n-2);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int main()
|
|
|
|
|
{
|
|
|
|
|
int n,x;
|
|
|
|
|
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD>õ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
|
|
|
|
scanf("%d",&n);
|
|
|
|
|
|
|
|
|
|
int i;
|
|
|
|
|
for(i=0;i<=n;i++)
|
|
|
|
|
{
|
|
|
|
|
x=fibonacci(i);
|
|
|
|
|
printf("<EFBFBD><EFBFBD>%d<><64>쳲<EFBFBD><ECB3B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ%d\n",i,x);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|