Write the program for fibonacci in c++?

Answer Posted / techbots

#include<iostream>
void main()
{
int x=1,y=0;
while (x<200)
{
cout<<y<<endl;
x=x+y;
y=x-y;
}
}

Is This Answer Correct ?    34 Yes 53 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is polymorphism and its type in c++?

599


Can we use clrscr in c++?

539


What are the types of pointer?

559


what are the iterator and generic algorithms.

1691


What are special characters c++?

572






What is the use of string in c++?

556


Difference between a copy constructor and an assignment operator.

580


Why do we need c++?

601


How do I get good at c++ programming?

605


What does new in c++ do?

577


Are c and c++ different?

549


Where must the declaration of a friend function appear?

541


What is ios in c++?

655


Is swift faster than c++?

572


Can we define a constructor as virtual in c++?

607