rado84

PointOnASegment

Jun 3rd, 2016
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace PointOnSegment
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. //variables
  14. int dot1 = int.Parse(Console.ReadLine());
  15. int dot2 = int.Parse(Console.ReadLine());
  16. int point = int.Parse(Console.ReadLine());
  17.  
  18. //locations
  19. if (point > dot1 && point < dot2)
  20. {
  21. Console.WriteLine("in");
  22. }
  23.  
  24. if (point < dot1 && point < dot2)
  25. {
  26. Console.WriteLine("out");
  27. }
  28.  
  29. if (point > dot1 && point > dot2)
  30. {
  31. Console.WriteLine("out");
  32. }
  33. }
  34. }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment