#include #include using namespace std; int main() { string str; string store [100]; int i = 0; cout<<"Enter a string:
Posted: Mon Jun 06, 2022 4:53 pm
#include #include using namespace std; int main() { string str; string store [100]; int i = 0; cout<<"Enter a string: \n"; while (1) { getline (cin, str); if(str == "STOP")
if(str == "STOP") { break; } else { store = str; i++; } } cout << "String list generated in reverse: \n"; for (int j =i- 1; j>=0; j--) { cout << store [j] << endl; }
} cout << "String list generated in reverse: \n"; for (int j =i- 1; j>=0; j--) { cout << store [j] << endl; } return 0;