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 wrong with this program statement? void = 10;
What is typedef example?
How can you find the exact size of a data type in c?
Is null always equal to 0(zero)?
How many keywords are there in c?
Is c weakly typed?
What are the valid places to have keyword “break”?
What is the full form of getch?
When should structures be passed by values or by references?
What is meant by errors and debugging?
disply the following menu 1.Disply 2.Copy 3.Append; as per the menu do the file operations 4.Exit
Is there any algorithm to search a string in link list in the minimum time?(please do not suggest the usual method of traversing the link list)
What is a function in c?
What is cohesion in c?
Differentiate between a for loop and a while loop? What are it uses?