Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Point_on_Rectangle_Border
- {
- class Program
- {
- static void Main(string[] args)
- {
- decimal x1 = decimal.Parse(Console.ReadLine());
- decimal y1 = decimal.Parse(Console.ReadLine());
- decimal x2 = decimal.Parse(Console.ReadLine());
- decimal y2 = decimal.Parse(Console.ReadLine());
- decimal x = decimal.Parse(Console.ReadLine());
- decimal y = decimal.Parse(Console.ReadLine());
- bool isOnBorder = ((x1 < x2) && (y1 < y2) && (x == x1 || x == x2) && (y1 <= y || y2 <= y) && (y == y1 || y == y2) &&
- (x1 <= x || x2 <= x));
- if (isOnBorder)
- {
- Console.WriteLine("Border");
- }
- else
- {
- Console.WriteLine("Inside / Outside");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement