UNPKG

socially-distanced-capacity

Version:

Calculates the maximum capacity of people for safe social distancing within given dimension of an indoor space

15 lines (8 loc) 453 B
const prompt = require('prompt-sync')({sigint: true}); console.log('Please enter the Length and Width of your indoor space in feet'); let spaceLength = prompt("Length: "); let spaceWidth = prompt("Width: "); let dividerValue = 7.5; let squareSpace = Number(spaceLength) * Number(spaceWidth); let maxOccupancy = Math.floor(squareSpace/dividerValue); console.log("The maximum number of people that can safely occupy your space is " + maxOccupancy);