8 lines
237 B
C
8 lines
237 B
C
// Simple function for compiler-quality comparison.
|
|
unsigned long sumSquares(unsigned short n) {
|
|
unsigned long total = 0;
|
|
for (unsigned short i = 1; i <= n; i++) {
|
|
total += (unsigned long)i * i;
|
|
}
|
|
return total;
|
|
}
|