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 c program for sum of first n terms of the series
S = 1 - (1/3) + (1/5) -(1/7) + (1/9) ......

Answer Posted / lavanya

void main()
{
int i,n,sum;
printf("enter n");
scanf("%d",&n);
for(i=1,i<=n,i++)
{
sum=1;
sum=sum+(1%(2i+1));
printf("sum=%d");
}

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why isnt any of this standardized in c?

1131


What tq means in chat?

1175


What is the difference between struct and typedef struct in c?

1173


If a variable is a pointer to a structure, then which operator is used to access data members of the structure through the pointer variable?

1313


What is a loop?

1113


What is the difference between call by value and call by reference in c?

1216


pgm to find any error in linklist(in single linklist check whether any node points any of previous nodes instead of next node)

2697


Explain goto?

1207


What is c definition?

1341


Is c still relevant?

1141


What is scope rule in c?

1124


What is c system32 taskhostw exe?

1075


i want to know the procedure of qualcomm for getting a job through offcampus

2519


Is c easier than java?

1125


the real constant in c can be expressed in which of the following forms a) fractional form only b) exponential form only c) ascii form only d) both a and b

2758