Advertisement
Berchev

Training Lab

Mar 30th, 2016
284
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.65 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 _01.Training_Lab
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.            
  14.             double height = double.Parse(Console.ReadLine());
  15.             double width = double.Parse(Console.ReadLine());
  16.  
  17.             width *= 100;
  18.             height *= 100;
  19.  
  20.             double deskPerRow = Math.Floor((width-100)/70);
  21.             double rows = Math.Floor(height / 120);
  22.  
  23.             int desks = (int)rows * (int)deskPerRow - 3;
  24.  
  25.             Console.WriteLine(desks);
  26.  
  27.  
  28.         }
  29.     }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement