Advertisement
ktopchiev

Tailoring Workshop

Nov 29th, 2017
519
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.88 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace Tailoring_Workshop
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int tablesNumber = int.Parse(Console.ReadLine());
  14.             double tableLenght = double.Parse(Console.ReadLine());
  15.             double tableWidth = double.Parse(Console.ReadLine());
  16.             double coverArea = tablesNumber * (tableLenght + 2 * 0.30) * (tableWidth + 2 * 0.30);
  17.             double boxcoverArea = tablesNumber * (tableLenght / 2) * (tableLenght / 2);
  18.             double priceInUsd = coverArea * 7 + boxcoverArea * 9;
  19.             double priceInBgn = (coverArea * 7 + boxcoverArea * 9) * 1.85;
  20.             Console.WriteLine($"{priceInUsd:F2} USD");
  21.             Console.WriteLine($"{priceInBgn:F2} BGN");
  22.         }
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement