Advertisement
knikolov98

Untitled

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