/*
The sum of the squares of the first ten
natural numbers is,
385
The square of the sum of the first ten
natural numbers is,
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.
*/
class Program
{
static void Main(string[] args)
{
System.Numerics.BigInteger
sumOfSquares = 0;
for (System.Numerics.BigInteger i = 1; i <= 100; i++)
{
sumOfSquares += (i * i);
}
System.Numerics.BigInteger sums =
0;
for (int i = 1; i
<= 100; i++)
{
sums = sums + i;
}
System.Numerics.BigInteger
squareOfSums = sums * sums;
Console.WriteLine(squareOfSums -
sumOfSquares );
}
}