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 / jitendra goyal

#include<stdio.h>
#include<conio.h>
main()
{
int a=0,b=1,n,c;
printf("how many element you want in series");
scanf("%d",&n);
printf("%d%d",a,b);
for(i=0;i<=n-2;i++)
{
c=a+b;
print("%d",c);
a=b;
b=c;
}
getch();
}

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why do we need constructors in c++?

1056


What is a float in c++?

926


Is main a class in c++?

960


What is meant by entry controlled loop? What all C++ loops are exit controlled?

1012


What is the difference between delegation and implemented-in-terms-of?

957


Explain how an exception handler is defined and invoked in a Program.

1116


What can I safely assume about the initial values of variables which are not explicitly initialized?

997


Is it possible for a member function to delete the pointer, named this?

1080


Is std :: string immutable?

988


Can constructor be private in c++?

979


What is java and c++?

1088


What is the this pointer?

1068


Why do we use using namespace std in c++?

1021


Is arr and &arr are same expression for an array?

998


What is c++ library?

989