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

What is a catch statement?

1113


Mention the ways in which parameterized can be invoked. Give an example of each.

1113


What are the two types of comments, and how do they differ?

1211


What are the differences between the function prototype and the function defi-nition?

1158


Can we inherit constructor in c++?

1143


What is the benefit of encapsulation?

1124


Can union be self referenced?

1216


What is constructor in C++?

1143


Specify some guidelines that should be followed while overloading operators?

1262


What is meant by iomanip in c++?

1290


What are static member functions?

1158


Can comments be nested?

1083


What is new in c++?

1153


How are pointers type-cast?

1168


What is a unnitialised pointer?

1139