Advertisement
Guest User

Untitled

a guest
Oct 15th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.    function tailoringWorkshop(input){
  2.         tables = parseInt(input.shift());
  3.         lengthOfTables = parseFloat(input.shift());
  4.         widthOfTables = parseFloat(input.shift());
  5.  
  6.         tableclothUSD = ((lengthOfTables + 0.6) * (widthOfTables + 0.6)) * tables * 7;
  7.         tableclothBGN = tableclothUSD * 1.85;
  8.         tablecentreUSD = (Math.pow(lengthOfTables/2, 2)) * tables * 9;
  9.         tablecentreBGN = tablecentreUSD * 1.85;
  10.  
  11.         sumBGN = tableclothBGN + tablecentreBGN;
  12.         sumUSD = tableclothUSD + tablecentreUSD ;
  13.        
  14.         console.log(sumUSD.toFixed(2) + ' USD');
  15.         console.log(sumBGN.toFixed(2) + ' BGN');
  16.        
  17.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement