Write code that inserts userItem into the output string stream itemsOSS until the user enters "Exit". Each item should be followed by a space. Sample output if user input is "red purple yellow Exit":
red purple yellow
#include #include #include using namespace std;int main() {string userItem;ostringstream itemsOSS;cout < "enter="" items="" (type="" exit="" to="" quit):"=""><>cin >> userItem;while (userItem != "Exit") {/* Your solution goes here */cin >> userItem;}cout < itemsoss.str()=""><>return 0;}Please help me with this problem using c++.
int main() {string userItem;ostringstream itemsOSS;
cout < "enter="" items="" (type="" exit="" to="" quit):"=""><>cin >> userItem;
while (userItem != "Exit") {
/* Your solution goes here */
cin >> userItem;}
cout < itemsoss.str()=""><>
return 0;}
Please help me with this problem using c++.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here