Question: USING C++ 1) Write code in the while loop below to take any amount of input (until EOI), insert each word into a [correctly declared]
1) Write code in the while loop below to take any amount of input (until EOI), insert each word into a [correctly declared] vector. Then print the words in reverse order with a space between each word. If you know rbegin0 and rendO, use them, else use indices. int main(O string word; // read input into vector. Declare the vector here while (cin >>word) l Print the vector's words in reverse order. (4 pts.) return o
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
