//DISPLAY 8.9 Using a Vector #include #include using namespace std; int main( ) { vector v; cout << "Enter a list of positive numbers.\n" << "Place a negative number at the end.\n"; int next; cin >> next; while (next > 0) { v.push_back(next); cout << next << " added. "; cout << "v.size( ) = " << v.size( ) << endl; cin >> next; } cout << "You entered:\n"; for (unsigned int i = 0; i < v.size( ); i++) cout << v[i] << " "; cout << endl; return 0; }