标签:names ios ace for lin ++ name cto tor
#include <iostream>
#include <string>
#include <vector>
#include <stdlib.h>
using namespace std;
int main(){
string str;
while(getline(cin,str))
{
vector<string> array;
string temp;
for(auto i=0;i<str.size();i++)
{
if((str[i]>=‘a‘&&str[i]<=‘z‘)||(str[i]>=‘A‘&&str[i]<=‘Z‘))
temp+=str[i];
else{
array.push_back(temp);
temp.clear();
}
}
vector<string>::reverse_iterator it=array.rbegin();
while(it!=array.rend())
{
cout<<*it<<" ";
++it;
}
cout<<endl;
}
system("pause");
return 0;
}
标签:names ios ace for lin ++ name cto tor
原文地址:http://www.cnblogs.com/zhaodun/p/6891922.html