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
Why is extern used in c?
Explain About fork()?
Can we access the array using a pointer in c language?
What is the easiest sorting method to use?
Tell me what are bitwise shift operators?
count = 0; for (i = 1;i < = 10; i++);count = count + i; Value of count after execution of the above statements will be a) 0 b) 11 c) 55 d) array
c language supports bitwise operations, why a) 'c' language is system oriented b) 'c' language is problem oriented c) 'c' language is middle level language d) all the above
void main(int n) { if(n==0) return; main(--n); printf("%d ",n); getch(); } how it work and what will be its output...............it any one know ans plz reply
Explain what standard functions are available to manipulate strings?
What are the different properties of variable number of arguments?
Are the outer parentheses in return statements really optional?
Should I learn data structures in c or python?
Why do we write return 0 in c?
What are global variables and explain how do you declare them?
which of the following is not a character constant a) 'thank you' b) 'enter values of p, n ,r' c) '23.56E-o3' d) all of the above