Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- public class Program
- {
- public static void Main()
- {
- int h = int.Parse(Console.ReadLine());
- int x = int.Parse(Console.ReadLine());
- int y = int.Parse(Console.ReadLine());
- var inside = (((x > 0) && (x<3*h)) && ((y>0)&& (y<h)) && ((x>h) && (x<2*h)) && ((y>h) && (y<4*h)));
- var outside = (((x < 0) && (x>3*h)) && ((y<0)&& (y>h)) && ((x<h) && (x>2*h)) && ((y<h) && (y>4*h)));
- if (inside)
- {
- Console.WriteLine("inside");
- }
- else if (outside)
- {
- Console.WriteLine("inside");
- }
- else
- Console.WriteLine("border");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement