fork download
  1. <?php
  2.  
  3.  
  4. function bank($percent, $commission, $deposit, $monthlyPayment){
  5. for ($i = 0; $i < 99; $i ++){
  6. $deposit = $deposit * $percent + $commission - $monthlyPayment;
  7. if($deposit <= 0){
  8. break;
  9. }
  10. return $i;
  11. }
  12.  
  13.  
  14. $creditSum = 39999;
  15. $monthlyPayment = 5000;
  16. $month = bank(1.04, 500, $creditSum, $monthlyPayment);
Runtime error #stdin #stdout #stderr 0.02s 52472KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
PHP Parse error:  syntax error, unexpected end of file in /home/m0ZLma/prog.php on line 17