123-wind

题目链接:点这里


题目描述:
输入任意4个字符(如:abcd), 并按反序输出(如:dcba)


思路:
字符串逆序输出


代码:

#include <bits/stdc++.h>
using namespace std;

int main(){
    string s;
    while(cin >> s){
        for(int i=s.length()-1;i>=0;i--)
            cout << s[i];
        cout << endl;
    }
    return 0;
}

分类:

技术点:

相关文章:

  • 2021-12-18
  • 2021-09-18
  • 2022-12-23
  • 2021-07-24
  • 2022-01-08
  • 2021-05-22
  • 2021-07-12
  • 2021-07-30
猜你喜欢
  • 2022-02-23
  • 2021-12-18
  • 2021-12-18
  • 2021-12-18
  • 2021-12-18
  • 2021-12-28
  • 2021-06-04
相关资源
相似解决方案