Project Euler 6 - Sum Square Difference

Official link: https://projecteuler.net/problem=6

Thought Process

  1. sum 1^2 to 100^2

  2. Sum numbers 1 to 100 then square the sum

Subtract them

Or you can use Triangular Number and Square Pyramidal Number

Interactive Code

Input an integer (yourinput)

Code will output the difference between the sum of the squares of the first yourinput natural numbers and the square of the sum.