Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class InsideTheBuilding
- {
- static void Main()
- {
- int size = int.Parse(Console.ReadLine());
- for (int i = 0; i < 5; i++)
- {
- int X = int.Parse(Console.ReadLine());
- int Y = int.Parse(Console.ReadLine());
- IsInsidePoints(X, Y, size);
- }
- }
- static void IsInsidePoints(int X, int Y, int h)
- {
- if (Y >= 0 && Y <= h * 4 && X >= h && X <= h * 2
- || (Y >= 0 && Y <= h) && (X >= 0 && X <= h * 3))
- {
- Console.WriteLine("inside");
- }
- else
- {
- Console.WriteLine("outside");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment