Advertisement
Vassil_Iliev

Repainting SoftUni task

Feb 8th, 2022
21
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 razreditel = Number(input[2]);
  5.     let chasoveMaistori = Number(input[3]);
  6.     let torbichki = 0.4;
  7.     let nylonPrice = (nylon + 2) * 1.5;
  8.     let paintPrice = paint * 14.5;
  9.     let razreditelPrice = razreditel * 5;
  10.  
  11.     let sumOfMaterials = (nylonPrice + paintPrice + razreditelPrice) + ((paint * 0.1) * 14.5) + (torbichki);
  12.     let rabotniciPayment = (sumOfMaterials * 0.30) * chasoveMaistori;
  13.     let total = sumOfMaterials + rabotniciPayment;
  14.     console.log(total);
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement