Computer Science, asked by patelradhey731, 8 months ago

write a program I java to print the square of the numbers from 1 to 10 also print the sum of it​

Answers

Answered by itzankit21
0

Answer:

Input : N = 4

Output : 30

12 + 22 + 32 + 42

= 1 + 4 + 9 + 16

= 30

Iput : N = 5

Output : 55

Answered by pavithranatarajan855
3

Answer:

public class calculate{

public static void main(String args[])

{

int sum=0;

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

{

sum+=i;

System.out.println(i+"^2="+(i*i));

}

System.out.println("sum="+sum);

}

}

Explanation:

Please mark me as brainliest!

Similar questions