1 #include"iostream"
 2 #include"string"
 3 #include"vector"
 4 #include"sstream"
 5 #include"stdio.h"
 6 using namespace std;
 7 
 8 int main()
 9 {
10     string str;
11     vector<string> word;
12     string res;
13 
14     while(getline(cin,str))
15     {
16         word.clear();
17         stringstream input(str);
18         while(input>>res)
19         {
20             word.push_back(res);
21         }
22         for(int i=word.size()-1;i>0;i--)
23             cout<<word[i]<<" ";
24         cout<<word[0]<<endl;
25     }
26     return 0;
27 }
View Code

相关文章:

  • 2021-06-12
  • 2021-11-29
  • 2022-12-23
  • 2022-03-03
  • 2022-12-23
  • 2021-05-15
  • 2021-10-22
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-16
  • 2021-06-11
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案