#include #include using namespace std; int main() { string str; string store [100]; int i = 0; cout<<"Enter a string:

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

#include #include using namespace std; int main() { string str; string store [100]; int i = 0; cout<<"Enter a string:

Post 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 17 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 17 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 17 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;
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply