Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $cap = 120000;
- $rata = 678;
- $tasso = 3.2;
- $num = 240;
- $spese = 10000;
- $ris=$cap;
- $tot=$cap-$spese;
- $c=0;
- for($i=$tasso; $tot<=(int)$ris; $i=$i+0.0001){
- $f1=pow((1+($i/100)), -(1/12));
- $f2=$rata*$f1;
- $f3=(1-(pow((1+($i/100)), -($num/12))));
- $f4=$f3/(1-$f1);
- $ris=$f2*$f4;
- echo $ris." ".number_format($i,2,",",".")." $c<br>";
- $c++;
- }
Add Comment
Please, Sign In to add comment