Advertisement
Spocoman

06. Repainting

Nov 30th, 2021 (edited)
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function repainting(input){
  2.  
  3.     let nylon = Number(input[0]);
  4.     let paint = Number(input[1]);
  5.     let thinner = Number(input[2]);
  6.     let hours = Number(input[3]);
  7.  
  8.     let materialsPrice = (nylon + 2) * 1.50 + paint * 14.50 * 1.1 + thinner * 5 + 0.40;
  9.     let workersPrice = materialsPrice * 0.30 * hours;
  10.  
  11.     console.log(materialsPrice + workersPrice);
  12. }
  13.  
  14.  
  15. Тарикатско решение :)
  16.  
  17. function repainting(input){
  18.  
  19.     let materialsPrice = (Number(input[0]) + 2) * 1.50 + Number(input[1]) * 14.50 * 1.1 + Number(input[2]) * 5 + 0.40;
  20.     let workersPrice = materialsPrice * 0.30 * Number(input[3]);
  21.  
  22.     console.log(materialsPrice + workersPrice);
  23. }
  24.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement