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
What are the operators in c++?
What are proxy objects in c++?
What do c++ programmers do?
Explain the difference between realloc() and free() in c++?
What is lambda expression c++?
Discuss the effects occur, after an exception thrown by a member function is unspecified by an exception specification?
What are the two main components of c++?
Explain the register storage classes in c++.
Difference between struct and class in terms of access modifier.
Given the following seqment of code containing a group of nested if instructions: y = 9; if ((x==3) || (x == 5)) y++; else if (x == 2) y *= 2; else if (x == ) y-= 7; else y = 8; if the value of x is 4 before the nested IFs are executed, what is the value of y after the nested IFs are executed?
What do you mean by overhead in c++?
Can member data be public?
What is implicit conversion/coercion in c++?
What can I safely assume about the initial values of variables which are not explicitly initialized?
Is it possible to provide default values while overloading a binary operator?