Advertisement
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;
- class Program
- {
- static void Main()
- {
- int one = int.Parse(Console.ReadLine());
- int two = int.Parse(Console.ReadLine());
- int three = int.Parse(Console.ReadLine());
- bool oneBig = ((one >= two) && (one >= three));
- bool twoBig = ((two >= one) && (two >= three));
- bool threeBig = ((three >= two) && (three >= one));
- //1
- bool oneTwoThree = (two >= three);
- bool oneThreeTwo = (three >= two);
- //2
- bool twoOneThree = (one >= three);
- bool twoThreeOne = (three >= two);
- //3
- bool threeOneTwo = (one >= two);
- bool threeTwoOne = (three >= one);
- bool condition = (((one >= -1000) && (two >= -1000) && (three >= -1000)) && ((one <= 1000) && (two <= 1000) && (three <= 1000)));
- //1
- if (((one >= -1000) && (two >= -1000) && (three >= -1000)) && ((one <= 1000) && (two <= 1000) && (three <= 1000)))
- {
- if ((oneBig) && (oneTwoThree) && (condition))
- {
- Console.WriteLine($"{one} {two} {three}");
- }
- else if ((oneBig) && (oneThreeTwo)&& (condition))
- {
- Console.WriteLine($"{one} {three} {two}");
- }
- //2
- else if ((twoBig) && (twoOneThree) && (condition))
- {
- Console.WriteLine($"{two} {one} {three}");
- }
- else if ((twoBig) && (twoThreeOne) && (condition))
- {
- Console.WriteLine($"{two} {three} {one}");
- }
- //3
- else if ((threeBig) && (threeOneTwo) && (condition))
- {
- Console.WriteLine($"{three} {one} {two}");
- }
- else if ((threeBig) && (threeTwoOne) && (condition))
- {
- Console.WriteLine($"{threeTwoOne}");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement