Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Linq;
- namespace _2622020
- {
- class Program
- {
- static void Main(string[] args)
- {
- int a = int.Parse(Console.ReadLine());
- int b = int.Parse(Console.ReadLine());
- int c = int.Parse(Console.ReadLine());
- if ((a <= b && b <= c) || (a >= b && b >= c)) //1 2 3, 3 2 1
- {
- Console.WriteLine("center");
- }
- else if ((c >= a && c >= b) || (c <= a && b >= c))// 2 1 3, 2 3 1, 3 1 2, 1 3 2
- {
- Console.WriteLine("left");
- }
- else
- {
- Console.WriteLine("right");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement