SortMas

mail@pastecode.io avatar
unknown
csharp
a year ago
586 B
1
Indexable
Never
static void Main(string[] args)
        {

            int[] mass = new int[10];

            for (int i = 0; i < mass.Length; i++)
            {
                mass[i] = int.Parse(Console.ReadLine());
                for (int j = 0; j < mass.Length; j++)
                   
                if (mass[j]>mass[j+1])
                {
                    int temp = mass[j];
                    mass[i] = mass[i+1];
                    mass[i + 1] = temp;
                }
                Console.WriteLine(mass[i] + ",");

                

            }
        }