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