Advertisement
Btwonu

Untitled

Feb 9th, 2020
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function dancingRoom(input) {
  2.     // Variables
  3.     let roomLength = Number(input.shift()) * 100;
  4.     let roomWidth = Number(input.shift()) * 100;
  5.     let garderobe = Math.pow(Number(input.shift() * 100), 2);
  6.     let roomArea = roomLength * roomWidth;
  7.     let bench = roomArea / 10;
  8.     let freeSpace = roomArea - garderobe - bench;
  9.     let dancers = freeSpace / (40 + 7000);
  10.  
  11.     // console.log(roomArea);
  12.     // console.log(garderobe);
  13.     // console.log(bench);
  14.     // console.log(freeSpace);
  15.     console.log(Math.floor(dancers));
  16.  
  17. }
  18.  
  19. dancingRoom([
  20.     50,
  21.     25,
  22.     2,
  23. ])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement