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 type is sizeof?
What does struct node * mean?
What is the value of a[3] if integer a[] = {5,4,3,2,1}?
When should the const modifier be used?
What is null in c?
please send me the code for multiplying sparse matrix using c
Do string constants represent numerical values?
What does static variable mean in c?
What does double pointer mean in c?
What is spaghetti programming?
Distinguish between actual and formal arguments.
Do you know what are bitwise shift operators in c programming?
What will the preprocessor do for a program?
What is logical error?
What is scope and lifetime of a variable in c?