CST 116 Austin Guertin Module 7: Lab 7 12a #include #include using namespace std; //function to read input void read(string str[], int idx) { getline(cin, str[idx]); } int main() { string str[100]; int choice, size = 0; while (1) { cout << "\nPress 1: To add a string\n"; cout << "Press 2: To print the strings\n"; cout << "Press 3: Exit the program\n\n"; cout << "Enter your choice down below: "; cin >> choice; if (choice == 1) { cin.ignore(80, '\n'); cout << "\nEnter a string: "; read(str, size++); } else if (choice == 2) break; else if (choice == 3) return 0; else cout << "\n\nInvalid input!\n\n"; } cout << endl << "The input strings are: \n\n"; for (int i = 0; i < size; i++) { if (str[i] == "don't print") break; cout << str[i] << endl; } return 0; } 12b 11c