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":...


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++.



Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here