<?php $creditSum = 40000; $payOut = 5000; $paymentTotal = 0; function bank($percent, $comission){ for ($mounth = 0; $mounth <= 20; $mounth++){ if($creditSum*$percent+$comission <= $payOut) { $payOut = $creditSum*$percent+$comission; $creditSum = $creditSum*$percent+$comission - $payOut; $paymentTotal = $paymentTotal + $payOut; break; } $creditSum = $creditSum*$percent + $comission - $payOut; $paymentTotal = $paymentTotal + $payOut; } return $paymentTotal; } $dengi = bank(1.04, 500); echo "Всего выплачено {$dengi} "; ?>
Standard input is empty
Всего выплачено 0
PHP Notice: Undefined variable: creditSum in /home/7jkk4e/prog.php on line 11 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 11 PHP Notice: Undefined variable: creditSum in /home/7jkk4e/prog.php on line 19 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 19 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 20 PHP Notice: Undefined variable: paymentTotal in /home/7jkk4e/prog.php on line 20 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 11 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 19 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 20 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 11 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 19 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 20 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 11 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 19 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 20 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 11 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 19 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 20 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 11 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 19 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 20 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 11 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 19 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 20 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 11 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 19 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 20 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 11 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 19 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 20 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 11 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 19 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 20 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 11 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 19 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 20 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 11 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 19 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 20 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 11 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 19 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 20 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 11 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 19 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 20 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 11 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 19 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 20 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 11 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 19 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 20 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 11 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 19 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 20 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 11 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 19 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 20 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 11 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 19 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 20 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 11 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 19 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 20 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 11 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 19 PHP Notice: Undefined variable: payOut in /home/7jkk4e/prog.php on line 20