Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

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

1090


c program to compute AREA under integral

2360


What does != Mean in c?

1005


What are header files and what are its uses in C programming?

1163


What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?

1290


Explain what is meant by 'bit masking'?

1148


What is a nested formula?

1081


Why do we use int main instead of void main in c?

1120


What is a good way to implement complex numbers in c?

1018


What is #define size in c?

1143


Why does this code crash?

1053


Why void is used in c?

982


In a byte, what is the maximum decimal number that you can accommodate?

1090


How can you increase the size of a statically allocated array?

1055


What does a function declared as pascal do differently?

1077