Advertisement
Niicksana

Tailoring Workshop

Dec 13th, 2017
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.92 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 _1.Tailoring_Workshop
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             // Exam - 03 September 2017
  14.             int tables = int.Parse(Console.ReadLine());
  15.             double lengthtable = double.Parse(Console.ReadLine());
  16.             double widthtable = double.Parse(Console.ReadLine());
  17.  
  18.             double lenghtSquare = lengthtable / 2;
  19.  
  20.             double areaTables = tables * (lengthtable + 2 * 0.30) * (widthtable + 2 * 0.30);
  21.             double areaSquare = tables * lenghtSquare * lenghtSquare;
  22.  
  23.             double priceDollars = areaTables * 7 + areaSquare * 9;
  24.             double priceLeva = priceDollars * 1.85;
  25.  
  26.             Console.WriteLine("{0:f2} USD", priceDollars);
  27.             Console.WriteLine("{0:f2} BGN", priceLeva);
  28.         }
  29.     }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement