Problem 6 from Project Euler [beginners exercise]

This is where most of us started. Classic Spectrum basic.

Moderator: Programming Moderators

Post Reply
User avatar
Brayn-3
Posts: 14
Joined: Thu Jun 01, 2017 7:15 pm

Problem 6 from Project Euler [beginners exercise]

Post by Brayn-3 » Mon Jul 10, 2017 2:27 pm

Try the next one with a loop (and not a sum formula)

>> Problem 5 from Project Euler <<

The sum of the squares of the first ten natural numbers is,
1² + 2² + ... + 10² = 385

The square of the sum of the first ten natural numbers is,
(1 + 2 + ... + 10)² = 55² = 3025

Hence the difference between the sum of the squares of the first ten natural numbers and the square of the sum is 3025 − 385 = 2640.

Find the difference between the sum of the squares of the first one hundred natural numbers and the square of the sum.
prob006.png
prob006.png (4.11 KiB) Viewed 1008 times
Facebook entry
Problem 6, Project Euler

Post Reply