Page 1 of 1

#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
by answerhappygod
Include Include Using Namespace Std Int Main String Str String Store 100 Int I 0 Cout Enter A String 1
Include Include Using Namespace Std Int Main String Str String Store 100 Int I 0 Cout Enter A String 1 (25.15 KiB) Viewed 19 times
Include Include Using Namespace Std Int Main String Str String Store 100 Int I 0 Cout Enter A String 2
Include Include Using Namespace Std Int Main String Str String Store 100 Int I 0 Cout Enter A String 2 (18.15 KiB) Viewed 19 times
Include Include Using Namespace Std Int Main String Str String Store 100 Int I 0 Cout Enter A String 3
Include Include Using Namespace Std Int Main String Str String Store 100 Int I 0 Cout Enter A String 3 (12.19 KiB) Viewed 19 times
Need this converted to C.
#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;