Scroll down to see how it works. If you'd rather solve the problem yourself, don't scroll. . . . . . How it works (this is a spoiler): ========================================= This one is extremely straightforward. We loop through each of the values of i (from 1 to 100) and add the square of i to sum 1. We then loop through i for sum to, this time not squaring i. At the end of this second loop, we square the entirety of sum 2. Simple subtraction gets our difference.
The @ProjectEuler account is created and maintained by @PullJosh. If you have questions, feel free to comment here or on my @PullJosh profile page for a much quicker response.