write a program for fibonaci series by using while loop in c?
Answer Posted / shamantha
main()
{
int a=0,b=1,c,n;
printf("enter n value");
scanf("%d",&n);
Printf("%d%d",a,b);
while(n-2>0)
{
c=a+b;
printf("%d",c);
a=b;
b=c;
n=n+1;
}
}
| Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
why arguments can generally be passed to functions a) sending the values of the arguments b) sending the addresses of the arguments c) a & b d) none of the above
c program to compute AREA under integral
What does != Mean in c?
What are header files and what are its uses in C programming?
What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?
Explain what is meant by 'bit masking'?
What is a nested formula?
Why do we use int main instead of void main in c?
What is a good way to implement complex numbers in c?
What is #define size in c?
Why does this code crash?
Why void is used in c?
In a byte, what is the maximum decimal number that you can accommodate?
How can you increase the size of a statically allocated array?
What does a function declared as pascal do differently?