Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function firm(input) {
- let hour = parseFloat(input[0]);
- let day = parseFloat(input[1]);
- let workers = parseFloat(input[2]);
- let firmHour = Math.floor (day * 8 * 0.9 + (2 * day * workers));
- if (hour > firmHour) {
- console.log(`Not enough time!${Math.floor(hour - firmHour)} hours needed.`);
- }
- else {
- console.log(`Yes!${Math.floor(firmHour - hour)} hours left.`);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement