Advertisement
Arxero

Remont na plochki

Jul 11th, 2017
286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.89 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 Remont_na_plochki
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int N = int.Parse(Console.ReadLine());
  14.             double W = double.Parse(Console.ReadLine());
  15.             double L = double.Parse(Console.ReadLine());
  16.             int M = int.Parse(Console.ReadLine());
  17.             int O = int.Parse(Console.ReadLine());
  18.  
  19.             double time = 0.2;
  20.             int bench = (M * O);
  21.             int workground = (N * N);
  22.             int coverage_area = (workground - bench);
  23.             double tiles = (L * W);
  24.  
  25.             double needed_tiles = (coverage_area / tiles);
  26.             Console.WriteLine(Math.Round(needed_tiles,2));
  27.             Console.WriteLine(Math.Round(needed_tiles * time,2));
  28.         }
  29.     }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement