class Program
{
static void Main(string[] args)
{
int[] sortArry ={ 0, 5, 6, 2, 1 };
for (int i = 0; i < sortArry.Length; i++)
{
for (int j = i+1; j <sortArry.Length; j++)
{
if (sortArry[j]<sortArry[i])
{
int temp = sortArry[i];
sortArry[i] = sortArry[j];
sortArry[j] = temp;
}
}
}
foreach (int i in sortArry)
{
Console.WriteLine(i);
}
}
}
{
static void Main(string[] args)
{
int[] sortArry ={ 0, 5, 6, 2, 1 };
for (int i = 0; i < sortArry.Length; i++)
{
for (int j = i+1; j <sortArry.Length; j++)
{
if (sortArry[j]<sortArry[i])
{
int temp = sortArry[i];
sortArry[i] = sortArry[j];
sortArry[j] = temp;
}
}
}
foreach (int i in sortArry)
{
Console.WriteLine(i);
}
}
}