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

Explain high-order bytes.

1121


Why is structure padding done in c?

1134


What do header files do?

1078


What is structure pointer in c?

1058


What is unary operator?

1108


What is the purpose of void in c?

1070


What are nested functions in c?

1025


What is the scope of local variable in c?

1134


What are the different categories of functions in c?

1138


Where in memory are my variables stored?

1186


What is the scope of an external variable in c?

1050


What are multibyte characters?

1131


Explain what is the advantage of a random access file?

1125


Explain how do you print only part of a string?

1222


What does static variable mean in c?

1110