fork download
  1. <?php
  2.  
  3. $balanceCredit = 40000; #цена
  4. $percent = 1.03; #процент
  5. $comisis = 1000;
  6. $PayMonth = 5000; #платит месяц
  7. $balance = 0; #то что уже выплатил
  8.  
  9. for ($month1 = 1; $month1 < 20000; $month1 ++) {
  10.  
  11. $balanceCredit = ($balanceCredit * $percent) + $comesis;
  12. $balance = $balance + $PayMonth;
  13. if ($balanceCredit > 5000) {
  14. $balanceCredit = $balanceCredit - $PayMonth;
  15. } elseif ($balanceCredit < 5000) {
  16. $PayMonth == $balanceCredit;
  17. break;
  18. echo "VsE";
  19. }
  20. echo "Плачу {$PayMonth} в {$month1} месяц, осталось $balanceCredit. Выплачено всего {$balance}. \n";
  21.  
  22.  
  23. }
  24.  
  25. }
  26. // your code goes here
Runtime error #stdin #stdout #stderr 0.01s 20592KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
PHP Parse error:  syntax error, unexpected '}' in /home/yY72yp/prog.php on line 26