Advertisement
Guest User

Tailoring Workshop

a guest
Sep 12th, 2019
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.63 KB | None | 0 0
  1.  int tables = int.Parse(Console.ReadLine());
  2.                                    
  3.             double length = double.Parse(Console.ReadLine());
  4.             double width = double.Parse(Console.ReadLine());
  5.  
  6.             double areaOnCover = (length + 2 * 0.30) * (width + 2 * 0.30);
  7.             double areaOnSquare = (length / 2) * (length / 2);
  8.  
  9.             double totalPriceInDollars = areaOnCover * 7 + areaOnSquare * 9;
  10.             double totalPriceInBGN = totalPriceInDollars * 1.85;
  11.  
  12.             Console.WriteLine($"{totalPriceInDollars:f2} USD");
  13.             Console.WriteLine($"{totalPriceInBGN:f2} BGN");
  14.         }
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement