Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function solution(input) {
- let tables = Number(input.shift());
- let tablesLength = Number(input.shift());
- let tablesWidth = Number(input.shift());
- let coverArea = tables * (tablesLenght + 2 * 0.30) * (tablesWidth + 2 * 0.30);
- let squaresArea = tables * (tablesLenght / 2) * (tablesLength / 2);
- let priceInDollars = coverArea * 7 + squaresArea * 9;
- let priceInLv = totalInUsd * 1.85;
- console.log(`${priceInDollars.toFixed(2)} USD`);
- console.log(`${priceInLv.toFixed(2)} BGN `);
- }
- solution (["10",
- "1.20",
- "0.65"]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement