Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function tailoringWorkshop(input){
- tables = parseInt(input.shift());
- lengthOfTables = parseFloat(input.shift());
- widthOfTables = parseFloat(input.shift());
- tableclothUSD = ((lengthOfTables + 0.6) * (widthOfTables + 0.6)) * tables * 7;
- tableclothBGN = tableclothUSD * 1.85;
- tablecentreUSD = (Math.pow(lengthOfTables/2, 2)) * tables * 9;
- tablecentreBGN = tablecentreUSD * 1.85;
- sumBGN = tableclothBGN + tablecentreBGN;
- sumUSD = tableclothUSD + tablecentreUSD ;
- console.log(sumUSD.toFixed(2) + ' USD');
- console.log(sumBGN.toFixed(2) + ' BGN');
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement