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 noteCsharp
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] input = Console.ReadLine().Split(char.Parse(" "));
            int[] result = new int[3];
            result[0] = int.Parse(input[0]);
            result[1] = int.Parse(input[1]);
            result[2] = int.Parse(input[2]);
            for(int i = 0; i < 2; i++)
            {
                for(int cycle = 0; cycle < 2; cycle++)
                {
                    if (result[cycle] > result[cycle + 1])
                    {
                        int temp = result[cycle];
                        result[cycle] = result[cycle + 1];
                        result[cycle + 1] = temp;
                    }
                }
            }
            Console.WriteLine(result[0] + " " + result[1] + " " + result[2]);
        }
    }
}