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;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Sorting_Three_Numbers
{
    class SortingThreeNumbers
    {
        static void Main()
        {
            string input = Console.ReadLine();
            string[] line = input.Split(' ');
            string answer = null;
            for (int i = 1; i < line.Length; i++)
            {
                for (int j = i; 0 < j; j--)
                {
                    if (int.Parse(line[j - 1]) > int.Parse(line[j]))
                    {
                        string a = line[j];
                        line[j] = line[j - 1];
                        line[j - 1] = a;
                    }
                    else
                    {
                        break;
                    }
                }
            }
            for (int i = 0; i < line.Length; i++)
            {
                answer += line[i];
                if (i + 1 != line.Length)
                {
                    answer += " ";
                }
            }
            Console.WriteLine(answer);
        }
    }
}