void display(int v[], int n) { for (int i = 0; i < n; i++) { cout << setw(4) << v[i]; } cout << endl; }