#include <iostream>
#include<sstream>
#include<vector>
#include<algorithm>
using namespace std;
int main()
{
string s;
while(getline(cin,s))
{
vector<string>V;
stringstream ss;
ss.str(s);
string sss;
while(ss>>sss)
{
V.push_back(sss);
}
for(int i=V.size()-1;i>=0;i--)
{
cout << V[i] << " ";
}
cout << endl;
}
}
HNU软件实训-字符串反转
最新推荐文章于 2024-08-23 22:20:39 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)