#include #include void bubbleSort(int* array, int size) { int sorted = 0; int i, temp; while(!sorted) { sorted = 1; for(i = 0; i < (size - 1); i++) { if(array[i] > array[i + 1]){ sorted = 0; temp = array[i]; array[i] = array[i + 1]; array[i + 1] = temp; } } } } #define SIZE 50000 int main() { int nums[SIZE], i; // put in random numbers for(i = 0; i < SIZE; i++) { nums[i] = rand() % 100; } // sort them bubbleSort(nums, SIZE); printf("All done!\n"); return 0; }