«

»

Apr 16 2007

$1,000,000 Or A Penny Doubled Per Day For A Month

I know that this has been around for a while, but I quickly wrote a script that did calculated it automatically and I thought it was cool.

If you do not know the situation, if you were offered $1,000,000 right now or a penny that doubled daily for a month, you would want to take the penny that doubled daily for a month because you would receive a substantially greater amount of money. See Below

< ?php
$start = "0.01";
for($i=1;$i<=31;$i++){
echo "

“;
$test[] = $start;
$start = $start * 2;
}
foreach($test as $key=>$value){
$total += $value;
}
echo “

“;
?>

Date of Month Money Earnings/Day
$i $”.number_format($start, 2).”
Total $”.number_format($total, 2).”

calculation, doubled, million dollars, money, penny

About the author

Timothy Haroutunian

Timothy Haroutunian is a ServiceNow Cloud Implementation Specialist at Acorio. ServiceNow is an IT Management solution that allows for a complete view of your IT and physical environment.

Permanent link to this article: http://www.armenianeagle.com/2007/04/16/1000000-or-a-penny-doubled-per-day-for-a-month/

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.