Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace PointOfSegment
- {
- class Program
- {
- static void Main(string[] args)
- {
- int first = int.Parse(Console.ReadLine());
- int second = int.Parse(Console.ReadLine());
- int point = int.Parse(Console.ReadLine());
- Console.WriteLine(point <= first && point >= second || point >= first && point <= second ? "in" : "out");
- Console.WriteLine(Math.Min(Math.Abs(first - point), Math.Abs(second - point)));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement