Advertisement
Guest User

Untitled

a guest
Mar 29th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. var calculate = (function () {
  2. var $q, $res;
  3. return function calculate //<?php function calculate
  4. ($base, $percent, $n) {
  5. $res = $base;
  6. $percent = 1 + $percent / 100;
  7.  
  8. for ($q=0; $q<$n; ++$q) {
  9. $res *= $percent;
  10. }
  11.  
  12. return $res;
  13. }
  14.  
  15. $q
  16. -->0;/*
  17. })(); //*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement