Euler #6
This one is so easy it's not even funny. I didn't even bother putting comments on it to show I coded it.
"What is the difference between the sum of the squares and the square of the sums?"
(They wanted the first *00 numbers)
[PHP]<?php
$sumsquare = 0;
$squaresum = 0;
for ($i=0; $i<=*00; $i++) {
$sumsquare += ($i * $i);
$squaresum += $i;
}
$new = ($squaresum * $squaresum);
$cheese = $new - $sumsquare;
echo $cheese;
?>[/PHP]
"Workers of the world unite; you have nothing to lose but your chains." -Karl Marx