public static void Main()
int[] numbers = { 45, 81, 29, 66, 03, 52, 51, 55, 74 };
Console.WriteLine("Example Bubble Sort");
bubbleSort(numbers, numbers.Length);
for (int i = 0; i < numbers.Length; i++)
Console.WriteLine(numbers[i]);
static void bubbleSort(int[] arr, int length)
for (int i = 0; i < length - 1; i++)
for (int j = 0; j < length - (i + 1); j++)