Advertisement
Guest User

Untitled

a guest
May 27th, 2017
362
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApplication9
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             var h = int.Parse(Console.ReadLine());
  14.             var x = int.Parse(Console.ReadLine());
  15.             var y = int.Parse(Console.ReadLine());
  16.             if (((x > 0) && (x < 3 * h) && (y > 0) && (y < h)) || ((x > h) && (x < 2 * h) && (y > h) && (y < 4 * h)) || ((x > h) && (x < 2 * h) && (y == h)))
  17.             {
  18.                 Console.WriteLine("Inside");
  19.             }
  20.             else if (((0 <= x) && (x <= 3 * h) && (y == 0)) || ((x == 0) && (y >= 0) && (y <= h)) || ((x == 3 * h) && (y >= 0) && (y <= h)) || ((x >= 0) && (x <= h) && (y == h))
  21.              || ((x == h) && (y >= h) && (y <= 4 * h)) || ((x == 2 * h) && (y >= h) && (y <= 4 * h)) || ((x >= h) && (x <= 2 * h) && (y == 4 * h))||((x>=2*h)&&(x<=3*h)&&(y==h)))
  22.             {
  23.                 Console.WriteLine("border");
  24.             }
  25.             else
  26.             {
  27.                 Console.WriteLine("outside");
  28.             }
  29.         }
  30.     }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement