Based on the sale of 1000 numbers in random order.
Reload/refresh the page to randomize the order of the numbers.
The code (PHP):
$numbers = range(1,1000);
shuffle($numbers);
for($i=1;$i<=999;$i++)
{
$number = $numbers[$i];
$price = 1000 - $number;
$discount = 90 - ((floor($i / 100) * 10));
$price -= abs($price*$discount/100);
if($price<=40) $price = 40;
$total += $price;
$price_format = number_format($price);
$total_format = number_format($total);
$output[] = "<li>number $number price \$$price_format</li>";
}
$output = implode("\r", $output);
print("<h2>Revenue: \$$total_format</h2></p><ol>$output</ol>");