using System;
public class Program
{
public static void Main()
Random rand = new Random();
int[] list = new int[10];
Console.WriteLine("Unsorted List");
for(int i = 0; i < 10; i++)
list[i] = rand.Next(100);
Console.Write(list[i] + ", ");
}
int n = list.Length;
for (int i = 0; i < n - 1; i++)
for (int j = 0; j < n - i - 1; j++)
if (list[j] > list[j + 1])
var tempVar = list[j];
list[j] = list[j + 1];
list[j + 1] = tempVar;
Console.WriteLine("\nSorted List");