koksibg

Point_in_Rectangle

Nov 5th, 2016
242
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_Rectangle
  8. {
  9.     class Point_in_Rectangle
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             var x1 = decimal.Parse(Console.ReadLine());
  14.             var y1 = decimal.Parse(Console.ReadLine());
  15.             var x2 = decimal.Parse(Console.ReadLine());
  16.             var y2 = decimal.Parse(Console.ReadLine());
  17.             var x = decimal.Parse(Console.ReadLine());
  18.             var y = decimal.Parse(Console.ReadLine());
  19.             if ((x >= x1) && (x <= x2) && (y >= y1) && (y <= y2))
  20.                 Console.WriteLine("inside");
  21.             else
  22.                 Console.WriteLine("outside");
  23.         }
  24.     }
  25. }
Add Comment
Please, Sign In to add comment