Advertisement
Guest User

Untitled

a guest
Jul 7th, 2016
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. using System;
  2. class Program
  3. {
  4. static void Main()
  5. {
  6. int h = int.Parse(Console.ReadLine());
  7. int x = int.Parse(Console.ReadLine());
  8. int y = int.Parse(Console.ReadLine());
  9. if ((x > 0 && x < 3 * h) && (y > 0 && y < h) || (x > h && x < 2 * h) && (y > 0 && y < 4 * h))
  10. {
  11. Console.WriteLine("inside");
  12. }
  13. else if (x >= 0 && y == 0 && x <= 3 * h
  14. || x >= 0 && y == h && x <= h
  15. && x >= 2 * h && y == h && x <= 3 * h
  16. || x >= h && y == 4 * h && x <= 2 * h
  17. || y >= 0 && x == 0 && y <= h
  18. || y >= h && x == h && y <= 4 * h
  19. || y >= h && x == 2 * h && y <= 4 * h
  20. || y >= 0 && x == 3 * h && y <= h)
  21. {
  22. Console.WriteLine("border");
  23. }
  24. else
  25. {
  26. Console.WriteLine("outside");
  27. }
  28. }
  29.  
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement