fork(4) download
  1. <?php
  2.  
  3. $credit = 40000;
  4. $proc = 1.03;
  5. $komis = 1000;
  6. $platez = 5000;
  7. $summa = 0;
  8. $ostatok = $credit - $platez;
  9.  
  10. for ($month = 1; $month <= 20; $month++) {
  11. $credit = ($credit * $proc) + $komis - $platez;
  12. $summa = $summa + $platez;
  13. echo "На {$month} месяц долг: {$credit} руб, выплачено: {$summa} \n";
  14.  
  15. if ($credit < ($platez - $komis)) {
  16. $credit - $platez;
  17. echo "Долг меньше {$platez}. Осталось заплатить $credit \n";
  18. $summa + $credit;
  19. echo "Уплачено $summa \n";
  20. break;
  21. }
  22. }
  23. ?>
Runtime error #stdin #stdout #stderr 0s 4476KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
/spoj/php_run: line 1: exec: php: not found