fork(1) download
  1. <?php
  2.  
  3.  
  4. $deposit = 10000;
  5.  
  6. for ($year = 16; $year < 500; $year++) {
  7. $newSum = $deposit * 0.1;
  8. $deposit += $newSum;
  9. if ($deposit >= 1000000) {
  10. echo "You are a millionaire!\n";
  11. echo "You have ", $year, "years old!\n";
  12. exit();
  13. }
  14. }
  15.  
  16. ?>
Success #stdin #stdout 0.02s 52488KB
stdin
Standard input is empty
stdout
You are a millionaire!
You have 64years old!