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
Is c compiled or interpreted?
What are the types of type qualifiers in c?
Explain do array subscripts always start with zero?
how many types of operators are include in c language a) 4 b) 6 c) 8 d) 12
How do you determine whether to use a stream function or a low-level function?
When was c language developed?
Q.1 write a program to create binary tree 1 to 16 numbers? Q.2 write a program to creat a binary search tree for the member that is given by user?
How can you draw circles in C?
What are different storage class specifiers in c?
how can use subset in c program and give more example
What is the value of h?
Is there any data type in c with variable size?
What are the advantages of using Unions?
What is an expression?
Explain is it valid to address one element beyond the end of an array?