Write the program for fibonacci in c++?
Answer Posted / kishor niit ottapalam
#include<iostream>
int main()
{
int x,y;
x=y=1;
while (x<200)
{
cout<<y<<endl;
x=x+y;
y=x-y;
}
return 0;
}
Is This Answer Correct ? | 119 Yes | 82 No |
Post New Answer View All Answers
Does improper inheritance have a potential to wreck a project?
What is copy constructor? Can we make copy constructor private in c++?
Is c++ a float?
What is abstraction in c++ with example?
Explain mutable storage class specifier.
Can non-public members of another instance of the class be retrieved by the method of the same class?
What is do..while loops structure?
Does c++ have string data type?
Do we have to use initialization list in spite of the assignment in constructors?
Define stacks. Provide an example where they are useful.
What is the prototype of printf function?
Why c++ is called oop?
What is & in c++ function?
What does iomanip mean in c++?
Write an algorithm that determines whether or not an almost complete binary tree is a heap.