using System;
public class Program
{
public static void Main()
int[] arr=new int[5]{1,6,3,2,4};
int temp=0;
for(int i=0;i<arr.Length;i++)
for(int j=0;j<arr.Length-1;j++)
if(arr[j]>arr[j+1])
temp=arr[j+1];
arr[j+1]=arr[j];
arr[j]=temp;
}
for(int k=0;k<arr.Length;k++)
Console.WriteLine(arr[k]);