#include
#include
#include
#include
using namespace std;
int main() {
cout << "string: "; <br> string s;
getline(cin, s);
istringstream ss(s);
vector v;
while (ss >> s) v.push_back(s);
int j=v.size()-1;
for (int i=j; i>=0; i--)
cout<<v[i]<<" "; <br> cout<<endl;<br> system("pause");
return 0;
}
ввод - вывод
string: one two three four fife
fife four three two one