Advertisement
Liliana797979

calculator deposits

Nov 26th, 2020
332
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.   function calculatorDepoziti(arg1, arg2, arg3, arg4, arg5) {
  2.     let depositedAmount = Number(arg1);
  3.     let termOfTheDeposit = Number(arg2);
  4.     let annualInterestRate = Number(arg3);
  5.     let interest = Number(arg4);
  6.     let totalSum = Number(arg5);
  7.  
  8.     interest = depositedAmount * 5.7 / 100;
  9.     interestMonth = interest / 12;
  10.     totalSum = depositedAmount + termOfTheDeposit * ((interestMonth) / 12);
  11.  
  12.     console.log(totalSum.toFixed(2));
  13.   }
  14.  
  15.  
  16.   calculatorDepoziti("200",
  17.   "3",
  18.   "5.7");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement