compute the nth mumber in the fibonacci sequence?
Answer Posted / dinesh kumar .n
#include<stdio.h>
#include<conio.h>
void main()
{
int a=-1,b=1,c,n,i;
printf("enter the number");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
c=a+b;
printf("%d",c);
a=b;
b=c;
}
getch();
}
| Is This Answer Correct ? | 6 Yes | 1 No |
Post New Answer View All Answers
What is the difference between text files and binary files?
Can you please explain the difference between syntax vs logical error?
Do you know pointer in c?
Tell us bitwise shift operators?
What is double pointer in c?
Can a local variable be volatile in c?
What is uint8 in c?
What is a macro in c preprocessor?
Compare interpreters and compilers.
What oops means?
How can you draw circles in C?
What is c variable?
What is #pragma statements?
Is main is user defined function?
What is the use of getchar functions?