fork download
  1. <?php
  2. $age = 16;
  3. $percent = 1.1;
  4. for ($money = 10000; $money <= 1000000; $money *= $percent) {
  5. $age += 1;
  6. }
  7.  
  8. if ($age > 60) {
  9. echo "Не доживет. Возраст = $age";
  10. } else {
  11. echo "Доживет. Возраст = $age";
  12. }
Success #stdin #stdout 0.01s 82880KB
stdin
Standard input is empty
stdout
Не доживет. Возраст = 65