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
Describe the advantages of operator overloading?
Write about the use of the virtual destructor?
When is the copy constructor called?
Explain deep copy?
What is the use of vtable?
What is private, public and protected inheritance?
When are exception objects created?
Can user-defined object be declared as static data member of another class?
What is the purpose of extern storage specifier?
What is c++ mutable?
why is iostream::eof inside a loop condition considered wrong?
What is abstraction in c++?
What is while loops?
Comment on local and global scope of a variable.
Why namespace is used in c++?