Write the program for fibonacci in c++?
Answer Posted / n.muthukumar
#include
int main()
{
unsigned int i=0,j=0,sum=1,num;
printf("nEnter the limit for the series ");
scanf("%d",&num);
printf("%d",i);
while(sum
{
printf("%d ",sum);
i=j;
j=sum;
sum=i+j;
}
getch();
}
Is This Answer Correct ? | 12 Yes | 25 No |
Post New Answer View All Answers
How are virtual functions implemented in c++?
How does atoi function work?
How do you invoke a base member function from a derived class in which you have not overridden that function?
Can I make ios apps with c++?
Explain the difference between realloc() and free() in c++?
How do I use turbo c++?
What is oop in c++?
Why do we need constructors in c++?
When does the c++ compiler create temporary variables?
What is the difference between the indirection operator and the address of oper-ator?
Give 10 points of differences between C & C++.
Explain how the virtual base class is different from the conventional base classes of the opps.
What are smart pointers?
What is #include c++?
Explain how to initialize a const member data.