Advertisement
Didart

Repainting

Mar 4th, 2022
679
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function repainting(input) {
  2.     let nylon =  Number(input[0]);
  3.     let paint = Number(input[1]);
  4.     let thinner = Number(input[2]);
  5.     let hours = Number(input[3]);
  6.    
  7.     let nylonPrice = (nylon + 2) * 1.50;
  8.     let paintPrice = ((paint * 0.10) + paint) * 14.50;
  9.     let thinnerPrice = thinner * 5.00;
  10.  
  11.     let finalSum = nylonPrice + paintPrice + thinnerPrice + 0.40;
  12.     let workersSum = finalSum * 0.30 * hours;
  13.    
  14.     let total = finalSum + workersSum;
  15.  
  16.         console.log(total);
  17.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement