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
Why is c++ a mid-level programming language?
What is the basic structure of c++ program?
What is rtti in c++?
What is the difference between containment and delegation?
What is data hiding c++?
What are the two types of comments?
How do you initialize a string in c++?
List the special characteristics of constructor.
What are shallow and deep copies?
What are compilers in c++?
What are the advantages of using a pointer? Define the operators that can be used with a pointer.
Write a program to add three numbers in C++ utilizing classes.
What is private inheritance?
Difference between struct and class in terms of access modifier.
What is an accessor in c++?