0

Write a program using for loop that finds the sum of squares of the integers from 1 to n.

where n is a positive number entered by the user.

3rd Apr 2017, 2:08 PM
Tehreem
1 Resposta
+ 4
JAVA GET IDEA FROM HERE int sum=0; for(int x=1;x<=n;x++){ sum=sum + (x*x);}
3rd Apr 2017, 2:11 PM
Meharban Singh
Meharban Singh - avatar