#include<stdio.h>
#include<math.h>
int main(){
int n,i;
int sum=0;
printf("Enter
the n i.e. max values of series: ");
scanf("%d",&n);
sum = pow(((n * (n +
1) ) / 2),2);
printf("Sum of
the series : ");
for(i
=1;i<=n;i++){
if (i != n)
printf("%d^3 + ",i);
else
printf("%d^3 = %d ",i,sum);
}
return 0;
}
Sample
output:
Enter the n i.e. max values
of series: 3
Sum of the series: 1^3 + 2^3
+ 3^3 = 36
Mathematical
Formula:
Sum of the series 13 + 23 + 33 + … + n3 = (n (n+1)/2)2
6.
Write a c program to find out the sum of given H.P.
If
you have any suggestions on above sum of cube of n natural
numbers, please share us.
25 comments:
how to calculate 1^2+2^3+3^4+...n^n+1
Hi Dj,
I hope this program will help you.
#include "math.h"
int main(){
int sum=0,i=0,n;
scanf("%d",&n);
for(i=1;i<=n;i++){
sum = sum + pow(i,i+1);
}
printf("Sum of series: %d" sum);
}
how to calculate 1+2^3+3^5+4^7+....+n^m
how to calculate 1+2^3+3^5+4^7+.............+n^m
how to read 3 numbers a,r,n. and generate AP,GP,HP
Thanks
please help me in follwing program
1^4 + 2^4 + 3^4+5^4+7^4+....... upto 20 terms program
1+1/2^2+..+1/n^n
Mr. Ritesh I need help in the following :
1. 1+1=1
2. 1+2=3
3. 1+2+3=6
4. 1+2+3+4=10 Where N will come from keyboard input.
#include
#include
#include
int main()
{
int i,j,k,x=0,n;
long sum=0;
printf("Enter Limit Of Serires ");
scanf("%d",&n);
printf("1");
for(i=2,j=3;i<=n;i++,j=j+2)
{
x=pow(i,j);
sum=sum+x;
printf(" + %d^%d",i,j);
}
printf("=%ld",sum+1);
getch();
}
how to write a c program for sinx=x-(x^3/3!)+(x^5/5!)+...... this please help someone
how to write a c program for sinx=x-(x^3/3!)+(x^5/5!)+...... this please help someone
my email zahirkalmunai90@gmail.com
Design an algorithm to find the sum of the first n terms of the series. fs=0!+1!+2!+3!+……+n!(n>=0).
thanx for this and give me answer to the 1,8,27,64 print series
please help me in follwing program
s = x - x^2 + x^4- ... + x^n
how to calculate the series 1*1+1*2+2*3+3*5+5*8+8*13........
How to calculate the series 1^3 + 2^3 + …. + n^3=? in recursive function.
1 n! 2*(n-1)! 3(n-2)! ...... (n-2)*3! (n-1)*2! n*1! how to calculate this typ of series
Can anyone please help me with this series 2,6,11,10,15,21,18,24,31,26,35,41
URGENT!!!!
GIVE ME THE PROGRAM OF - 2X6+8X12+14X18+.....N
plz help me the number sequence 120,99,80,65.....
Post a Comment