Write the program for fibonacci in c++?
Answer Posted / abhilash
int main()
{
unsigned int i=0,j=0,sum=1,num;
printf("nEnter the limit for the series ");
scanf("%d",&num);
while(sum<num)
{
printf("%d ",sum);
i=j;
j=sum;
sum=i+j;
}
getch();
}
| Is This Answer Correct ? | 14 Yes | 27 No |
Post New Answer View All Answers
What is the full form of c++?
What does ctime() do?
Explain the different access specifiers for the class member in c++.
What is the use of string in c++?
What is the main purpose of c++?
what is data encapsulation in C++?
Why c++ is better than c language?
What is meant by iomanip in c++?
Can we use this pointer in a class specific, operator-overloading function for new operator?
What is a sequence in c++?
What is ifstream c++?
What is an arraylist c++?
Do class declarations end with a semicolon?
What is data abstraction? How is it different from data encapsulation?
Can you please explain the difference between static and dynamic binding of functions?