/////////////////////////////////////////////////////////////////////////////// // // BubbleSort.cpp // Input: list length n, and array list. // Output: list in increasing order. // /////////////////////////////////////////////////////////////////////////////// #include using namespace std; #define MAX_LIST_LEN 100 int main(void){ int n, // list length j, // loop control R; // index of rightmost element in unsorted section double temp, // temporary storage list[MAX_LIST_LEN]; // array to be sorted // Get values for n and list. cout << "Enter list length (must be less than or equal to " << MAX_LIST_LEN << "): "; cin >> n; cout << "Enter " << n << " numbers:" << endl; for(j=0; j> list[j]; } // perform BubbleSort algorithm on list for(R=n-1; R>0; R--){ for(j=1; j<=R; j++){ if( list[j]