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
What are the rules for identifiers in c?
what do the 'c' and 'v' in argc and argv stand for?
Is c compiled or interpreted?
What is meant by type casting?
What do you mean by invalid pointer arithmetic?
What are near, far and huge pointers?
What are operators in c?
What is calloc()?
Explain what math functions are available for integers? For floating point?
define string ?
What is the heap?
What is a null pointer assignment error? What are bus errors, memory faults, and core dumps?
Is null always equal to 0(zero)?
What is the purpose of the preprocessor directive error?
I need previous papers of CSC.......plz help out by posting them.......