-28. Sum of Squares with Recursion

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