fork download
  1. <?php
  2.  
  3.  
  4. function deposit($creditSum, $percent, $comission, $onePayment) {
  5. $realPercents = $percent / 100;
  6. $finalOnepay = $creditSum + $onePayment;
  7. $finalMonthly = ($finalOnepay * $realPercents) + $comission;
  8. return $finalMonthly;
  9. };
  10.  
  11. $creditSum = 39999;
  12. $payout = 5000;
  13. $homoCreditBank = deposit($creditSum, 4, 500, 0);
  14. $softbankTotal = deposit($creditSum, 3, 1000, 0);
  15. $strawberryBankTotal = deposit($creditSum, 2, 0, 7777);
  16.  
  17. echo "homoCredit: {$homoCreditBank} rub. \n";
  18. echo "softbank: {$softbankTotal} rub. \n";
  19. echo "strawberryBank: {$strawberryBankTotal} rub. \n";
Success #stdin #stdout 0.01s 52488KB
stdin
Standard input is empty
stdout
homoCredit: 2099.96 rub. 
softbank: 2199.97 rub. 
strawberryBank: 955.52 rub.