Advertisement
Spocoman

Change Tiles

Oct 10th, 2023 (edited)
1,098
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function changeTiles(input) {
  2.     let areaSide = Number(input[0]);
  3.     let tileWidth = Number(input[1]);
  4.     let tileLength = Number(input[2]);
  5.     let benchWidth = Number(input[3]);
  6.     let benchLength = Number(input[4]);
  7.  
  8.     let area = areaSide * areaSide - benchLength * benchWidth;
  9.     let tileArea = tileWidth * tileLength;
  10.     let tiles = area / tileArea;
  11.     let time = tiles * 0.2;
  12.  
  13.     console.log(`${tiles}\n${time}`);
  14.     return;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement