Advertisement
bibi2200

TailoringWorkshop

Nov 13th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.72 KB | None | 0 0
  1. using System;
  2.  
  3. namespace TailoringWorkshop
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             int table = int.Parse(Console.ReadLine());
  10.             double lenght = double.Parse(Console.ReadLine());
  11.             double width = double.Parse(Console.ReadLine());
  12.  
  13.             double areaOneCover = (lenght + 2 * 0.30) * (width + 2 * 0.30);
  14.             double areaOneSquare = (lenght / 2) * (lenght / 2);
  15.  
  16.             double totalPriceUsd = (areaOneCover * 7 + areaOneSquare * 9) * table;
  17.             double totalPriceBgn = totalPriceUsd * 1.85;
  18.  
  19.             Console.WriteLine($"{totalPriceUsd:F2} USD");
  20.             Console.WriteLine($"{totalPriceBgn:F2} BGN");
  21.         }
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement