fork(6) download
  1. <?php
  2.  
  3. $credit = 40000 ;
  4. $payment = 5000 ;
  5. $procent = 1.03 ;
  6. $comission = 1000 ;
  7. $paymenTotal = 0
  8.  
  9. for ($month = 1 ; $month <= 12 ; $month ++) {
  10. $credit= ($credit * $procent) - $payment + $comission ;
  11. $paymentTotal = $paymentTotal + $payment ;
  12. echo "Спустя $month месяцев выплачено $paymentTotal осталось выплатить $credit \n" ;
  13. if ($credit <=0){
  14. echo "Выплачено!" ;
  15. break ;}
  16. }
  17.  
  18.  
Runtime error #stdin #stdout #stderr 0.02s 52480KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
PHP Parse error:  syntax error, unexpected 'for' (T_FOR) in /home/tgdUUL/prog.php on line 10