Advertisement
koksibg

Point_in_Figure

Jul 12th, 2016
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.76 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 Point_in_Figure
  8. {
  9.     class Point_in_Figure
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int x = int.Parse(Console.ReadLine());
  14.             int y = int.Parse(Console.ReadLine());
  15.             int x1 = 4;
  16.             int y1 = -5;
  17.             int x2 = 10;
  18.             int y2 = 3;
  19.             int x3 = 2;
  20.             int y3 = -3;
  21.             int x4 = 12;
  22.             int y4 = 1;
  23.             if (((x >= x1) && (x <= x2) && (y >= y1) && (y <= y2)) || ((x >= x3) && (x <= x4) && (y >= y3) && (y <= y4)))
  24.                 Console.WriteLine("in");
  25.             else Console.WriteLine("out");
  26.         }
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement