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 / amitabha mukhopadhyay

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

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write an algorithm for implementing insertion and deletion operations in a singly linked list using arrays ?

3501


Why doesnt that code work?

1147


Write the test cases for checking a variable having value in range -10.0 to +10.0?

2308


What is identifiers in c with examples?

1155


What is the purpose of 'register' keyword?

1089


What is the condition that is applied with ?: Operator?

1118


Explain 'bit masking'?

1067


What are the types of functions in c?

974


What is size of union in c?

1004


differentiate built-in functions and user – defined functions.

1070


Define Spanning-Tree Protocol (STP)

1113


What is the use of gets and puts?

1010


What are pointers? What are different types of pointers?

1119


a way in which a pointer stores the address of a pointer which stores the value of the target value a) reference b) allocation c) multiple indirection d) none

1134


What are actual arguments?

1072