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
Tell me when is a void pointer used?
How old is c programming language?
Explain heap and queue.
How many levels of indirection in pointers can you have in a single declaration?
How do you use a 'Local Block'?
How can you determine the size of an allocated portion of memory?
Can we add pointers together?
What is difference between %d and %i in c?
What is the difference between int main and void main?
Explain how can I write functions that take a variable number of arguments?
What are 'near' and 'far' pointers?
What is difference between array and structure in c?
Why does notstrcat(string, "!");Work?
how is the examination pattern?
Input is "rama loves rajesh and rajesh Loves rama also and rajesh wear gloves and bloves" To print output is count the numbers of times repeted the word love without case sensitive.