Write a Java program for the following series 1²+2²+3²....+10²
Answers
Answered by
0
Answer:
#Its python program
x=1
s=0
for i in range(0,11):
s=s+x**2
x+=1
print(s,"is the sum of square of 1 to 10")
Hope you may get it
Mark as brainliests
Thank You...
Answered by
0
Answer:
import java.util.*;
class series
{ public static void main(String[]args)
{ int i=1;
while(i<=10)
{ System.out.println((i*i) + " ") ;
i+=1;
}}}
Explanation:
Here the loop will execute 10 times.
Here first it will do:-
1*1=1 i.e, 1²
2*2=4 i.e, 2² like this upto 10*10=100 i.e, 10².
HOPE IT HELPS YOU.
IF YOU FIND THIS HELPFUL MARK ME AS BRAINLIEST.
Similar questions