#include #include using namespace std; //Note that since arrays are AUTOMATICALLY passed by reference //you don't want a & next to v[] void read (istream & in, int v[], int & n) { int number; n=0; while (in>>number) { v[n++]=number; } } //The following is the familiar bubble sort void sort (int v[], const int & n) { for (int j=n-1; j>0; j--) for (int k=0; k v[k+1]) { int temp=v[k]; v[k] = v[k+1]; v[k+1] = temp; } } void write (ostream & out, const int v[], const int & n) { for (int k=0; k