//************************************************************ // Solutions to Homework 0 //************************************************************ // lab1b.cpp //************************************************************ // Modify the program so it prints out every other item // in the vector vList #include #include #include using namespace std; int main() { int n; cout << "How long is the list? "; cin >> n; vector sList(n); for (int i=0; i < n; i++) { cout << "Enter next string: "; cin >> sList[i]; } for (int i=0; i < n; i = i +2) { cout << sList[i] << "\n"; } }