Advertisement
koksibg

Tailoring_Shop

Sep 15th, 2017
542
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.80 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. namespace Tailoring_Shop
  7. {
  8.     class Program
  9.     {
  10.         static void Main(string[] args)
  11.         {
  12.             int n = int.Parse(Console.ReadLine());
  13.             double tableLenght = double.Parse(Console.ReadLine());
  14.             double tableWidth = double.Parse(Console.ReadLine());
  15.             double recArea = n * (tableLenght + 2 * 0.30) * (tableWidth + 2 * 0.30);
  16.             double squareArea = n * (tableLenght / 2) * (tableLenght / 2);
  17.             double priceUSD = recArea * 7 + squareArea * 9;
  18.             double priceBGN = priceUSD * 1.85;
  19.             Console.WriteLine("{0:f2} USD", priceUSD);
  20.             Console.WriteLine("{0:f2} BGN", priceBGN);
  21.         }
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement