write a program in java to print the square of the numbers from 1 to 10 also print the sum of it I will mark him brainleast who ever answers it right
Answers
Answered by
0
Given a positive integer N. The task is to find 12 + 22 + 32 + ….. + N2.
Examples:
Input : N = 4
Output : 30
12 + 22 + 32 + 42
= 1 + 4 + 9 + 16
= 30
Iput : N = 5
Output : 55
Similar questions