feat(solution): problem #6

main
steven 2023-07-31 12:51:34 -04:00
parent d110137e41
commit 4ce3e54c1b
1 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,12 @@
sumOfSquares = 0
squareOfSum = 0
for i in range(1,101):
squareOfSum += i
sumOfSquares += i * i
squareOfSum = squareOfSum * squareOfSum
difference = squareOfSum - sumOfSquares
print("The difference between the sum of the squares of the first one hundred natural numbers and the square of the sum is: ", str(difference))