ADD file via upload

master
pbqa92cj6 3 years ago
parent bbbaba2f77
commit a80b4a95ae

@ -0,0 +1,17 @@
#include<stdio.h>
int fib(int n)
{
if(n==1||n==2)
return 1;
else
return fib(n-1)+fib(n-2);
}
int main()
{
int n;
scanf("%d",&n);
int i;
for(i=1;i<=n;i++)
printf("%d ",fib(i));
return 0;
}
Loading…
Cancel
Save