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 the value of uninitialized variable in c?
How can I get back to the interactive keyboard if stdin is redirected?
Declare the structure which contains the following members and write in C list of all students who score more than 75 marks. Roll No, Name, Father Name, Age, City, Marks.
Are there any problems with performing mathematical operations on different variable types?
c language interview questions & answer
Is struct oop?
Not all reserved words are written in lowercase. TRUE or FALSE?
What are compound statements?
How can I write functions that take a variable number of arguments?
What is wrong with this program statement?
Write a Program to accept different goods with the number, price and date of purchase and display them
There is a practice in coding to keep some code blocks in comment symbols than delete it when debugging. How this affect when debugging?
How is = symbol different from == symbol in c programming?
What is the need of structure in c?
i have to apply for the rbi for the post of officers. i need to know abt the entrance questions whether it may be aps or techinical....