Solutions/p6/main.cpp
// Find the sum of squares up to k > 0.
Find the sum of squares up to k > 0.
Find the sum of squares up to k > 0 .
int sumOfSquares(int k) {
    auto output = 0;
    for (int i = 1; i <= k; ++i) {
        output += pow(i, 2);
    }
    return output;
}
int sumOfSquares ( int k ) { auto output = 0 ; for ( int i = 1 ; i <= k ; ++ i ) { output += pow ( i , 2 ) ; } return output ; }
Find the sum of squares up to k > 0.
Find the sum of squares up to k > 0 .