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 / psrthipan j

#include<iostream.h>
int main()
{
int x,y;
x=y=1;
while(x<20)
{
cout<<y<<end 1;
x=x+y;
y=x-y;
}
return 0;
}

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

declare an array of structure where the members of the structure are integer variable float variable integer array char variable access all elements of the structure using dot operator and this pointer operator

2318


What is private public protected in c++?

997


Where must the declaration of a friend function appear?

923


why and when we can declar member fuction as a private in the class?

2035


Perform addition, multiplication, subtraction of 2-D array using Operator Overloading.

3812


Can you pass an array to a function in c++?

967


What is the role of copy constructor in copying of thrown objects?

1018


Is c++ a programming language?

1037


What do you mean by friend class & friend function in c++?

1021


What is the best way to declare and define global variables?

1248


Write a program to add three numbers in C++ utilizing classes.

1070


Write a program to concatenate two strings.

1043


Differentiate between an inspector and a mutator ?

1164


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

1022


Can we specify variable field width in a scanf() format string? If possible how?

1177