Computer Science, asked by sunitazirange, 10 months ago

Write a java program to find the series upto 10 terms and also print the value of T . T=1+4+9+16+25....
T=1+4+9+16+25+36+49+64+81+100
=385
we have to print the value of 'T' like above and also print these series

Answers

Answered by Anonymous
0

Explanation:

class Sum_series

{

public static void main(String args[])

{

double s=0;

System.out.print("T=");

for(int i=1;i<=10;i++)

{

s=i*i+s;

System.out.print((i*i)+"+");

}

System.out.print("\b"+"="+s);

}

}

Similar questions