It’s your so-called bubbleSort
that’s actually not at all an implementation of bubble sort that fills your array with the same number, in a convoluted way. (How could it possibly be a sort function if it doesn’t ever compare values of the array?)
Why don’t you use the C standard library qsort
function if you don’t know how to properly implement a sort algorithm?
1
solved I thought i fixed it yesterday but i messed up, it still generates the same random number