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 preprocessor with example?
What is the purpose of sprintf?
Can stdout be forced to print somewhere other than the screen?
Explain how can I pad a string to a known length?
GIVEN A FLOATING POINT NUMBER HOW IS IT ACTUALLY STORED IN MEMORY ? CAN ANYONE EXPLAIN?? THE 32 BIT REPRESENTATION OF A FLOATING POINT NUMBER ALLOTS: 1 BIT-SIGN 8 BITS-EXPONENT 23 BITS-MANTISSA
What is void pointers in c?
Was 2000 a leap year?
Should I learn data structures in c or python?
When should the volatile modifier be used?
Write a program to print all permutations of a given string.
Is c still used?
What are the benefits of organizational structure?
Can we access the array using a pointer in c language?
Give basis knowledge of web designing ...
What is a pointer on a pointer in c programming language?