Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //сума = депозирана сума + срок на депозита * ((депозирана сума * годишен лихвен процент ) / 12)
- function depositCalculator(input) {
- let depositSum = Number(input[0]);
- let depositTime = Number(input[1]);
- let yearPercent = Number(input[2]);
- let interest = depositSum * (yearPercent / 100);
- let interestPerMonth = interest / 12;
- let totalSum = depositSum + (depositTime * interestPerMonth);
- console.log(totalSum);
- }
Add Comment
Please, Sign In to add comment