Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace _03.PointInRectangle
- {
- class PointInRectangle
- {
- static void Main()
- {
- var x1 = decimal.Parse(Console.ReadLine());
- var y1 = decimal.Parse(Console.ReadLine());
- var x2 = decimal.Parse(Console.ReadLine());
- var y2 = decimal.Parse(Console.ReadLine());
- var x = decimal.Parse(Console.ReadLine());
- var y = decimal.Parse(Console.ReadLine());
- if ((y==y1 ||y==y2)&&(x==x1||x==x2)&&(x>=x1)&&(x<=x2)&&(y>=y)&&(y<=y2))
- {
- Console.WriteLine("inside");
- }
- else
- {
- Console.WriteLine("outside");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement