Advertisement
Pijomir

Untitled

Jul 5th, 2022
714
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JavaScript 0.41 KB | None
  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 workingHours = Number(input[3]);
  7. let priceForMaterials = ((nylon + 2) * 1.5) + ((paint + (paint * 0.1)) * 14.5) + (thinner * 5) + 0.4;
  8. let priceForWorkers = (priceForMaterials * 0.3) * workingHours;
  9. let finalPrice = (priceForMaterials + priceForWorkers);
  10.  
  11. console.log(finalPrice);
  12.  
  13. }
Advertisement
RAW Paste Data Copied
Advertisement