Advertisement
Spocoman

Cat Expenses

Jan 7th, 2022
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function catExpenses(input) {
  2.  
  3.     let bed = Number(input[0]);
  4.     let toilet = Number(input[1]);
  5.  
  6.     let food = toilet * 1.25;
  7.     let toys = food / 2;
  8.     let vet = toys * 1.1;
  9.     let sum = (toilet + food + toys + vet) * 12 * 1.05 + bed;
  10.  
  11.     console.log(`${sum.toFixed(2)}`);
  12. }
  13.  
  14.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement