Guest User

Untitled

a guest
Jan 21st, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.34 KB | None | 0 0
  1. $cap = 120000;
  2. $rata = 678;
  3. $tasso = 3.2;
  4. $num = 240;
  5. $spese = 10000;
  6. $ris=$cap;
  7. $tot=$cap-$spese;
  8. $c=0;
  9. for($i=$tasso; $tot<=(int)$ris; $i=$i+0.0001){
  10.     $f1=pow((1+($i/100)), (1/12));
  11.  $f2=$rata*$f1;
  12.  $f3=(1(pow((1+($i/100)), -($num/12))));
  13.  $f4=$f3/(1-$f1);
  14.  $ris=$f2*$f4;
  15.  echo $ris." ".number_format($i,2,",",".")." $c<br>";
  16.  $c++;
  17. }
Add Comment
Please, Sign In to add comment