ulvis.paste.net

Paste Search Dynamic
Recent pastes
function credit
  1. <?php
  2.  
  3.  
  4. function credit( $percent , $servicePayment , $firstPayment,  $paymentTotal, $creditBalance , $monthlyPayment) {
  5. for ($i = 0 ; $i < 2505 ; $i++) {
  6.         if (($creditBalance * $percent + $servicePayment + $firstPayment) < $monthlyPayment) {
  7.                 $monthlyPayment = ($creditBalance * $percent + $servicePayment + $firstPayment) ;
  8.                 $creditBalance = $creditBalance * $percent + $servicePayment + $firstPayment ;
  9.         }
  10.                 $creditBalance = ($creditBalance * $percent + $servicePayment + $firstPayment) - $monthlyPayment ;
  11.         $paymentTotal = $paymentTotal + $monthlyPayment ;
  12. }
  13. return $paymentTotal ;
  14. }
  15.         $creditBalance = 39999 ;
  16.         $monthlyPayment = 5000 ;
  17. $homoCredit = credit(1.04 , 500 , 0 , 0, $creditBalance , $monthlyPayment) ;
  18.  
  19. echo " У банка homoCredit пацанчик заплатит всего : $homoCredit \n" ;
  20. echo " У банка softBank пацанчик заплатит всего : $softBank \n" ;
  21. echo " У банка strawberryBank пацанчик заплатит всего : $strawberryBank \n" ;
  22. ?>
  23.  
Parsed in 0.015 seconds