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 / darren chang

int fib(int input)
{
if(input==0)
return 0;
if((input==1)||(input==2))
return 1;
else
return fib(input-1)+fib(input-2);
}

Is This Answer Correct ?    10 Yes 31 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which sort does c++ use?

1081


What is the latest version on c++?

1183


What is the iunknown interface?

1182


What is vectorial capacity?

1231


What is a manipulative person?

1075


What are the advantages of using a pointer? Define the operators that can be used with a pointer.

1077


What is a constant? Explain with an example.

1080


Explain what are single and multiple inheritances in c++?

1071


What operator is used to access a struct through a pointer a) >> b) -> c) *

1164


How do you clear a set in c++?

1133


What are shallow and deep copies?

1167


What is c++ map?

1248


What is virtual table?

1174


What things would you remember while making an interface?

1056


What is string in c++ programming?

1278