Problem:
Sorting Three Numbers

Write a program which reads three integers, and prints them in ascending order.

Input

Three integers separated by a single space are given in a line.

Output

Print the given integers in ascending order in a line. Put a single space between two integers.

Constraints

1 ≤ the three integers ≤ 10000

Sample Input 1

3 8 1

Sample Output 1

1 3 8

Solution in C# (judge verdict: Accepted)

using System;

namespace ITP1_2_C
{
    class Program
    {
        static void Main(string[] args)
        {
            //??\???
            var inputs = new Inputs();
            inputs.Read();
            int a = inputs.GetInteger(0);
            int b = inputs.GetInteger(1);
            int c = inputs.GetInteger(2);

            compare(ref a,ref b,ref c);

            //??????
            Console.WriteLine(a + " " + b + " " + c);
        }

        private static void compare(ref int a, ref int b,ref int c)
        {
            int[] array = { a, b, c };
            for(int i = 0; i < array.Length - 1; i++)
            {
                for (int j = array.Length - 1;j > i; j--) {
                    if (array[j] < array[j - 1])
                    {
                        int buf = array[j];
                        array[j] = array[j - 1];
                        array[j - 1] = buf;
                    }
                }
            }
            a = array[0];
            b = array[1];
            c = array[2];
        }
    }
}

namespace ITP1_2_C
{
    class Inputs
    {
        // ?????????????????\??????????????????????????????
            private string[] inputs;

            public void Read()
            {
                string line = Console.ReadLine();
                this.inputs = line.Split(' ');
            }

            public int GetInteger(int number)
            {
                int data = int.Parse(inputs[number]);
                return data;
            }
    }
}