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

Explain what are binary trees?

1061


Explain how do you use a pointer to a function?

1093


Explain what is the concatenation operator?

1149


What is C language ?

1950


If fflush wont work, what can I use to flush input?

1083


How the c program is executed?

1139


what is the syallabus of computer science students in group- 1?

2306


What is a null string in c?

1024


What is dangling pointer in c?

1205


Is flag a keyword in c?

1142


can any one tel me wt is the question pattern for NIC exam

1959


How do you convert strings to numbers in C?

1213


What is a newline escape sequence?

1090


What are the 4 data types?

1001


What does c mean in basketball?

981