Advertisement
Guest User

tailoring-shop

a guest
Oct 14th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.65 KB | None | 0 0
  1. using System;
  2.  
  3. class Program
  4. {
  5.     static void Main(string[] args)
  6.     {
  7.         int tables = int.Parse(Console.ReadLine());
  8.         double tablesLength = double.Parse(Console.ReadLine());
  9.         double tablesWidth = double.Parse(Console.ReadLine());
  10.  
  11.         double tableCoverArea = tables * (tablesLength + 2 * 0.30) * (tablesWidth + 2 * 0.30);
  12.         double quadsArea = tables * (tablesLength / 2) * (tablesLength / 2);
  13.  
  14.         double priceUSD = (tableCoverArea * 7) + (quadsArea * 9);
  15.         double priceBGN = priceUSD * 1.85;
  16.  
  17.         Console.WriteLine($"{priceUSD:F2} USD");
  18.         Console.WriteLine($"{priceBGN:F2} BGN");
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement