Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Write the program for fibonacci in c++?

Answer Posted / nitish kumar nirala

#include<iostream.h>
#include<conio.h>
int fibo(int);
void main()
{
int n,fibbon;
cin>>n;//input number to find fabbonic series
fibbo=fibo(n);
cout<<fibbo<<"
";
getch();
}
int fibo(n)
{
if(n==0)
{
return 0;
}
elseif(n==1)
{
return 1;
}
else
{
return(fibo(n-1)+fibo(n-2));
}
}

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a set in c++?

919


Which operations are permitted on pointers?

948


What are the five basic elements of a c++ program?

1051


What is #include c++?

1048


Is c++ free?

1042


How does code-bloating occur in c++?

1139


Write some differences between an external iterator and an internal iterator?

973


why is iostream::eof inside a loop condition considered wrong?

1011


Difference between overloaded functions and overridden functions

1005


What does scope resolution operator do?

1053


Explain about Virtual Function in C++?

975


What header file is needed for exit(); a) stdlib.h b) conio.h c) dos.h

1007


Do you know about latest advancements in C++ ?

1158


What is the best c++ compiler?

1065


What is meant by iomanip in c++?

1129