题解 | #字符逆序#

字符逆序

http://www.nowcoder.com/practice/cc57022cb4194697ac30bcb566aeb47b

#include<iostream>
using namespace std;
int main()
{
    string str;
    while(getline(cin,str))
    {
        int len=str.length()-1;
        int i=0;
        string res;
        while(len>=0)
        {
            res.push_back(str[len--]);
        }
        cout<<res<<endl;
    }
    return 0;
}
全部评论

相关推荐

牛牛不会牛泪:可以先别急着租房,去青旅,或者订个近点的宾馆待几天。先看看要做的能不能学到东西,然后看文档完不完善,写的好不好,mentor对你咋样,公司氛围啥的。情况不对赶快跑路找下家
点赞 评论 收藏
分享
点赞 收藏 评论
分享
牛客网
牛客企业服务