Write the program for fibonacci in c++?
Answer Posted / bharghavi
#include<iostream.h>
void main()
{
int a=-1;b=1,c;
for(int i=0;i<200;i++)
{
c=a+b;
cout<<c<<"\t";
a=b;
b=c;
}
| Is This Answer Correct ? | 83 Yes | 65 No |
Post New Answer View All Answers
What is function prototyping? What are its advantages?
Differentiate between late binding and early binding. What are the advantages of early binding?
Write a function to find the nth item from the end of a linked list in a single pass.
Write down the equivalent pointer expression for referring the same element a[i][j][k][l]?
why and when we can declar member fuction as a private in the class?
Is java the same as c++?
Explain the difference between c & c++?
What is a node class in c++?
Is c++ a pure oop language?
Why we use #include iostream in c++?
Is atoi safe?
How many ways can a variable be initialized into in C++?
What are the benefits of pointers?
What is virtual function? Explain with an example
What is the meaning of string in c++?