Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace PictureInTheWall
- {
- class Program
- {
- static void Main()
- {
- int holeWidth = int.Parse(Console.ReadLine());
- int holeLength = int.Parse(Console.ReadLine());
- int paintingSide = int.Parse(Console.ReadLine());
- int numberOfPaintings = int.Parse(Console.ReadLine());
- int areaHole = holeLength * holeWidth;
- int areaPaintings = numberOfPaintings * paintingSide * paintingSide;
- int diff = Math.Abs(areaHole - areaPaintings);
- if (areaHole >= areaPaintings)
- {
- Console.WriteLine($"The pictures fit in the hole. Hole area is {diff} bigger than pictures area.");
- }
- else
- {
- Console.WriteLine($"The pictures don't fit in the hole. Picture area is {diff} bigger than hole area.");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement