bacco

Точка в правоъгълник

Jan 23rd, 2018
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.70 KB | None | 0 0
  1. using System;
  2.  
  3. namespace tESt
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.  
  10.             double x1 = double.Parse(Console.ReadLine());
  11.             double y1 = double.Parse(Console.ReadLine());
  12.             double x2 = double.Parse(Console.ReadLine());
  13.             double y2 = double.Parse(Console.ReadLine());
  14.             double x = double.Parse(Console.ReadLine());
  15.             double y = double.Parse(Console.ReadLine());
  16.  
  17.             if (x >= x1 && x <= x2 && y >= y1 && y <= y2)
  18.             {
  19.                 Console.WriteLine("Inside");
  20.             }
  21.             else
  22.             {
  23.                 Console.WriteLine("Outside");
  24.             }
  25.         }
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment