compute the nth mumber in the fibonacci sequence?
Answer Posted / sweety
main()
{ int a=0,b=1,c,n,i;
printf("enter nth number");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
c=a+b;
printf("fibonacci series is %d",&c);
a=b;
b=c;
}
getch();
}
| Is This Answer Correct ? | 5 Yes | 4 No |
Post New Answer View All Answers
What is c system32 taskhostw exe?
Is main a keyword in c?
Explain the difference between malloc() and calloc() in c?
What are the types of pointers?
What's the right way to use errno?
Is fortran still used today?
How many levels deep can include files be nested?
Explain how do you print only part of a string?
how logic is used
An organised method of depicting the use of an area of computer memory used to signify the uses for different parts of the memory a) swap b) extended memory c) memory map d) all of the above
Why should I prototype a function?
What are the valid places to have keyword “break”?
In which layer of the network datastructure format change is done
How can a program be made to print the line number where an error occurs?
what do you mean by inline function in C?