compute the nth mumber in the fibonacci sequence?
Answer Posted / d. prashant
#include<stdio.h>
#include<conio.h>
void main()
{
int a =0,b=1,c,i=2,n;
clrscr();
printf("Enter N Value : ");
scanf("%d",&n);
printf("%d\t%d\t",a,b);
while(n>i)
{
c = a+b;
printf("%d\t",c);
c=b;
b=a;
i++;
}
getch();
}
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
Write a program with dynamically allocation of variable.
Write a C Program That Will Count The Number Of Even And Odd Integers In A Set using while loop
What does %c mean in c?
Why double pointer is used in c?
How to write a code for implementing my own printf() and
scanf().... Please hep me in this... I need a guidance...
Can you give an coding for c... Please also explain about
the header files used other than #include
What is methods in c?
What is meant by type casting?
what is the role you expect in software industry?
Why doesn't C support function overloading?
Explain what is the benefit of using #define to declare a constant?
What is nested structure with example?
Write a program to know whether the input number is an armstrong number.
disply the following menu 1.Disply 2.Copy 3.Append; as per the menu do the file operations 4.Exit
any C program contains only one function, it must be a) void () b) main () c) message () d) abc ()
What is the newline escape sequence?