This is my code for the Bubble Sort. I cannot get the actual sorted values to output. The program reads the inputted numbers, but does not print it sorted. I\'m not sure what I
Try this Bubble sort :
private static void BubbleSort(int[] num) { for (int i = 0; i < num.length; i++) { for (int x = 1; x < num.length - i; x++) { if (num[x - 1] > num[x]) { int temp = num[x - 1]; num[x - 1] = num[x]; num[x] = temp; } } } }