Calculate the sum of squares of numbers from 1 to m
In C++, please help me and thanks
Answers
Answered by
1
Answer:
mark me as brilliant
Explanation:
C++ Program for Sum of squares of first n natural numbers
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
Answered by
1
Answer:
C++program of sum of squares of first natural numbers
Given a position integer N.The task is to find 12+22+32+......+N2
Example
input : N = 4
output : 30
12+22+32+42
=1+4+9+16
=30
input : N = 5
output : 55
Similar questions