Advertisement
Guest User

Untitled

a guest
Feb 26th, 2020
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. using System;
  2. using System.Linq;
  3.  
  4. namespace _2622020
  5. {
  6. class Program
  7. {
  8. static void Main(string[] args)
  9. {
  10. int a = int.Parse(Console.ReadLine());
  11. int b = int.Parse(Console.ReadLine());
  12. int c = int.Parse(Console.ReadLine());
  13.  
  14. if ((a <= b && b <= c) || (a >= b && b >= c)) //1 2 3, 3 2 1
  15. {
  16. Console.WriteLine("center");
  17. }
  18. else if ((c >= a && c >= b) || (c <= a && b >= c))// 2 1 3, 2 3 1, 3 1 2, 1 3 2
  19. {
  20. Console.WriteLine("left");
  21. }
  22. else
  23. {
  24. Console.WriteLine("right");
  25. }
  26. }
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement