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
Write my own zero-argument manipulator that should work same as hex?
If we want that any wildcard characters in the command line arguments should be appropriately expanded, are we required to make any special provision? If yes, which?
You run a shell on unix system. How would you tell which shell are you running?
When should we use multiple inheritance?
What are features of c++?
Why is c++ a mid-level programming language?
What is ios :: in in c++?
How should a contructor handle a failure?
Difference between Abstraction and encapsulation in C++?
In which header file does one find isalpha() a) conio.h b) stdio.h c) ctype.h
What are the five basic elements of a c++ program?
What is the use of default constructor?
What is == in programming?
Why pointer is used in c++?
What are the 4 types of library?