<?php
function creditAmmount($dolg, $percent, $commision, $month) {
for ($i = 0; $i < $month; $i++) {
$dolg = (($dolg * $percent) + $commision);
}
return $dolg;
}
$balanse = creditAmmount(40000, 1.04, 500, 10);
echo ($balanse);
$payment = 5000;
for ($s=0; $s)
PD9waHAKCmVycm9yX3JlcG9ydGluZygtMSk7CgpmdW5jdGlvbiBjcmVkaXRBbW1vdW50KCRkb2xnLCAkcGVyY2VudCwgJGNvbW1pc2lvbiwgJG1vbnRoKSB7Cglmb3IgKCRpID0gMDsgJGkgPCAkbW9udGg7ICRpKyspIHsKCQkgJGRvbGcgPSAgKCgkZG9sZyAqICRwZXJjZW50KSArICRjb21taXNpb24pOwoJfQoKCXJldHVybiAkZG9sZzsKCX0KJGJhbGFuc2UgPSBjcmVkaXRBbW1vdW50KDQwMDAwLCAxLjA0LCA1MDAsIDEwKTsKZWNobyAoJGJhbGFuc2UpOwoKJHBheW1lbnQgPSA1MDAwOwogCmZvciAoJHM9MDsgJHMpCg==