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 the following series:
1*3*5-2*4*6+3*5*7-4*6*8+.................up to nterms

Answer Posted / y hussain reddy

#include<stdio.h>
#include<conio.h>
#include<math.h>

void main()
{
int i,p,n;
long s=0;
puts("nter n\n");
scanf("%d",&n);
for(i=1;i<=n;i++)
{p=pow(-1,i-1);
s+=i*(i+2)*(i+4)*p;
}
printf("ans=%ld",s);
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is return in c programming?

914


c program to compute AREA under integral

2331


Combinations of fibanocci prime series

1553


How do you convert strings to numbers in C?

1165


When is the “void” keyword used in a function?

1426


What are all different types of pointers in c?

953


What are the types of c language?

973


Explain Basic concepts of C language?

1074


Which is better oop or procedural?

982


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

2608


What is the explanation for prototype function in c?

920


Explain what are its uses in c programming?

1012


What does 3 periods mean in texting?

1006


what is the significance of static storage class specifier?

2179


What is structure and union in c?

1066