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
How can I change the size of the dynamically allocated array?
What does char * * argv mean in c?
Write a program with dynamically allocation of variable.
What are the types of variables in c?
Write a program to find factorial of a number using recursive function.
What are data types in c language?
What is the use of getchar() function?
How can I sort more data than will fit in memory?
What is the purpose of ftell?
Which is better oop or procedural?
How can you increase the allowable number of simultaneously open files?
What is const volatile variable in c?
How can I display a percentage-done indication that updates itself in place, or show one of those twirling baton progress indicators?
Should I learn data structures in c or python?
Is it possible to initialize a variable at the time it was declared?