@@ -0,0 +1,971 @@
+import java.util.Map;%0A%0A/**%0A * The sum of the squares of the first ten natural numbers is,%0A *      1%5E2 + 2%5E2 + ... + 10%5E2 = 385%0A * The square of the sum of the first ten natural numbers is,%0A *      (1 + 2 + ... + 10)%5E2 = 55%5E2 = 3025%0A * Hence the difference between the sum of the squares of the first ten natural numbers and the square of the sum is%0A * 3025 %E2%88%92 385 = 2640.%0A *%0A * Find the difference between the sum of the squares of the first one hundred natural numbers and the square of the sum.%0A *%0A * @author david.clutter@greyrocksoft.com%0A */%0Apublic class Problem0006 %7B%0A%0A    public static void main(final String%5B%5D args) %7B%0A        long sumOfSquares = 0;%0A        long squareOfSums = 0;%0A        for(int i = 1; i %3C= 100; ++i) %7B%0A            sumOfSquares += Math.pow(i, 2);%0A            squareOfSums += i;%0A        %7D%0A        squareOfSums = (long) Math.pow(squareOfSums, 2);%0A        long difference = squareOfSums - sumOfSquares;%0A        System.out.println(difference);%0A    %7D%0A%7D%0A

Add Problem0006