Advertisement
Spocoman

Change Tiles

Oct 10th, 2023
1,154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.71 KB | None | 0 0
  1. using System;
  2.  
  3. namespace ChangeTiles
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             int areaSide = int.Parse(Console.ReadLine());
  10.             double tileWidth = double.Parse(Console.ReadLine());
  11.             double tileLength = double.Parse(Console.ReadLine());
  12.             int benchWidth = int.Parse(Console.ReadLine());
  13.             int benchLength = int.Parse(Console.ReadLine());
  14.  
  15.             int area = areaSide * areaSide - benchLength * benchWidth;
  16.             double tileArea = tileWidth * tileLength;
  17.             double tiles = area / tileArea;
  18.             double time = tiles * 0.2;
  19.  
  20.             Console.WriteLine($"{tiles}\n{time}");
  21.         }
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement