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 / abhilash

int main()
{
unsigned int i=0,j=0,sum=1,num;
printf("nEnter the limit for the series ");
scanf("%d",&num);
while(sum<num)
{
printf("%d ",sum);
i=j;
j=sum;
sum=i+j;

}


getch();
}

Is This Answer Correct ?    14 Yes 27 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write my own zero-argument manipulator that should work same as hex?

1007


If we want that any wildcard characters in the command line arguments should be appropriately expanded, are we required to make any special provision? If yes, which?

1460


You run a shell on unix system. How would you tell which shell are you running?

1133


When should we use multiple inheritance?

1011


What are features of c++?

1118


Why is c++ a mid-level programming language?

982


What is ios :: in in c++?

1011


How should a contructor handle a failure?

1127


Difference between Abstraction and encapsulation in C++?

1092


In which header file does one find isalpha() a) conio.h b) stdio.h c) ctype.h

1173


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

1065


What is the use of default constructor?

1061


What is == in programming?

981


Why pointer is used in c++?

1103


What are the 4 types of library?

1133