+ 1
Bubble Sort and Array
Can some one help me with a c++ program? I am trying to wrap my head around how to have the size of an array be defined by the user. And then they will enter the array and it will be followed up by a bubble sort. Please help, Thank you.
2 Answers
+ 4
int size;
cin >> size;
int *array = new int[size];
if (array != nullptr) {
for (int index = 0; index < size; index++)
cin >> array[index];
bubbleSort(array);
}
+ 4
Here you go đ,
Just incase sir Wells code is too advanced for you https://code.sololearn.com/cTs25L9VujJi/?ref=app