字符逆序

#include<bits/stdc++.h>
using namespace std;
int main()
{
    string a;
    while(getline(cin,a)!=NULL)
    {
        reverse(a.begin(),a.end());
        cout<<a<<endl;
    }
    return 0;
}

你可能感兴趣的:(算法)