fork download
  1. <?php
  2. header('Content-type: text/plain; charset=utf-8');
  3.  
  4. $startCapital = 10000;
  5. $bankPercent = 10;
  6. $age = 16;
  7.  
  8. $balance = $startCapital;
  9. for ($i = 0; $balance < 1000000; $i++) {
  10. $balance = $balance + (($balance / 100) * 10);
  11. }
  12. $ageOfInvestor = $i + $age;
  13. echo "Спустя $i лет, на счету вкладчика будет $balance рублей. Вкладчику на этот момент будет $ageOfInvestor лет. ";
Success #stdin #stdout 0.02s 23712KB
stdin
Standard input is empty
stdout
Спустя 49 лет, на счету вкладчика будет 1067189.5716336 рублей. Вкладчику на этот момент будет 65 лет.