Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Sort3Numbers
- {
- class Sort3Numbers
- {
- 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)
- {
- if (b > c)
- {
- Console.WriteLine("{0} {1} {2}", a, b, c);
- }
- else
- {
- Console.WriteLine("{0} {1} {2}", a, c, b);
- }
- }
- else if (b > a)
- {
- if (a > c)
- {
- Console.WriteLine("{0} {1} {2}", b, a, c);
- }
- else
- {
- Console.WriteLine("{0} {1} {2}", b, c, a);
- }
- }
- else if (c > a)
- {
- if (a > b)
- {
- Console.WriteLine("{0} {1} {2}", c, a, b);
- }
- else
- {
- Console.WriteLine("{0} {1} {2}", c, b, a);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement