-28. Sum of Squares with Recursion

 avatar
user_6817964
c_cpp
2 years ago
127 B
0
Indexable
Never
int main() {
	int n, sum = 0;
	scanf("%d", &n);
	for (int i = 1; i <= n; i++) {
		sum += i * i;
	}
	printf("%d", sum);
}