Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Picture_in_the_Wall
- {
- class Program
- {
- static void Main(string[] args)
- {
- var widthHole = double.Parse(Console.ReadLine());
- var lengthHole = double.Parse(Console.ReadLine());
- var pictureSide = double.Parse(Console.ReadLine());
- var pictersCount = double.Parse(Console.ReadLine());
- double holeArea = widthHole * lengthHole;
- double picturesArea = (pictureSide * pictureSide) * pictersCount;
- double difference = Math.Abs(holeArea - picturesArea);
- if (holeArea >= picturesArea)
- {
- Console.WriteLine("The pictures fit in the hole. Hole area is {0} bigger than pictures area.", difference);
- }
- else
- {
- Console.WriteLine("The pictures don't fit in the hole. Picture area is {0} bigger than hole area.", difference);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement