#include<iostream.h>
#include<conio.h>
int fabnoci ( int n )
{
if ( n<=1 )
return 1 ;
if ( n<=0 )
return 0 ;
else
return fabnoci(n-1)+fabnoci(n-2);
}
int main ()
{
int num ;
cout<<"\n\n Enter The Number : ";
cin>>num;
cout<<"\n\n\n\t\t Fabnocii : "<< fabnoci( num );
cout<<"\n\n\n";
}
- Blogger Comment
- Facebook Comment
Subscribe to:
Post Comments
(
Atom
)
0 comments:
Post a Comment