Advertisement
Guest User

Untitled

a guest
Jun 15th, 2016
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 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 _11PointInTheFigure
  8. {
  9. class PointInTheFigure
  10. {
  11. static void Main(string[] args)
  12. {
  13. int h = int.Parse(Console.ReadLine());
  14. int x = int.Parse(Console.ReadLine());
  15. int y = int.Parse(Console.ReadLine());
  16.  
  17. if ((x > 0 && x < 3 * h) && (y > 0 && y < h) || ( x > h && x < 2 * h) && (y > 0 && y < 4 * h))
  18.  
  19. {
  20. Console.WriteLine("inside");
  21. }
  22. else if (((x < h && y > h) || (x > 2*h && y > h)) || (x > 3 * h) || (y < 0 )||( x < 0) || (y > 4 * h))
  23. {
  24. Console.WriteLine("outside");
  25. }
  26. else
  27. {
  28. Console.WriteLine("border");
  29. }
  30. }
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement