60 469
Assignments Done
98,1%
Successfully Done
In April 2018

Answer to Question #19073 in C++ for kshitij

Question #19073
write a program to print the sum of the following series : 1+(1*3)+(1*3*5)+.......N
Expert's answer
int main()
{

int N;
double sum;
printf("Enter number N= ");
scanf("%d",&N);
sum=1;
for(int i=1;i<=N;i++){
sum+=i*(i+2);
}


printf("
The sum = %f",sum);
printf("
Press any key to exit...");
scanf("%d",&N);

return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions