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 PointOnSegment
- {
- class Program
- {
- static void Main(string[] args)
- {
- //variables
- int dot1 = int.Parse(Console.ReadLine());
- int dot2 = int.Parse(Console.ReadLine());
- int point = int.Parse(Console.ReadLine());
- //locations
- if (point > dot1 && point < dot2)
- {
- Console.WriteLine("in");
- }
- if (point < dot1 && point < dot2)
- {
- Console.WriteLine("out");
- }
- if (point > dot1 && point > dot2)
- {
- Console.WriteLine("out");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment