#include <stdio.h>
#include <conio.h>
int fibn(int n)
{
int a, b, c;
if(n==1 || n==2)
return(n-1);
a=fibn(n-1);
b=fibn(n-2);
c=a+b;
return c;
}
int main()
{
int fib;
printf("Enter number: ");
scanf("%d", &fib);
printf("Fibnocii of %d is %d.", fib, fibn(fib));
getch();
}
#include <conio.h>
int fibn(int n)
{
int a, b, c;
if(n==1 || n==2)
return(n-1);
a=fibn(n-1);
b=fibn(n-2);
c=a+b;
return c;
}
int main()
{
int fib;
printf("Enter number: ");
scanf("%d", &fib);
printf("Fibnocii of %d is %d.", fib, fibn(fib));
getch();
}