Computer Science, asked by manjulucky020, 11 months ago

write a java program to print the sum of the following series:S=0+7+26+63.......upto n terms.

Answers

Answered by Samsriti
2

Answer:

Take n as input

Int I, s=0;

{

for(i=1;i<=n;i++)

{

Int m=(i*i*i) - 1;

S=S+m;

}

System.out.println(s);

}

Similar questions