This was also very simple, execution was immediate:

#include <iostream>
#include <math.h>
int main (int argc, char * const argv[]) {
const unsigned int limit = 101;
int i;
unsigned long long sumOfSquares = 0;
unsigned long long squareOfSums = 0;
long long diff;
for(i=1;i<limit;i++){
sumOfSquares += pow((i),2);
squareOfSums += i;
}
squareOfSums = pow(squareOfSums, 2);
diff = squareOfSums - sumOfSquares;
std::printf("Sum of Squares: %llu Square Of Sums: %llu the difference: %llu \n", sumOfSquares, squareOfSums, diff);
return 0;
}

### Like this:

Like Loading...

*Related*