时间限制:1秒 空间限制:32768K

题目描述

输入一个字符串,长度小于等于200,然后将数组逆置输出。
输入描述:
测试数据有多组,每组输入一个字符串。


输出描述:
对于每组输入,请输出逆置后的结果。

输入例子:
hdssg

输出例子:
gssdh

代码:
#include <iostream>
#include  <stdio.h>
#include <string.h>
using namespace std;

int main(){
   char a[210];
    while(gets(a)){
     for(int i=strlen(a)-1;i>=0;i--){
        cout<<a[i];
     }
     cout<<endl;
    }
   return 0;
}

 

相关文章:

  • 2021-04-03
  • 2021-11-25
  • 2022-12-23
  • 2021-10-05
  • 2021-11-30
  • 2021-09-06
  • 2021-07-12
  • 2022-01-19
猜你喜欢
  • 2021-08-26
  • 2022-02-22
  • 2021-08-26
  • 2021-09-22
  • 2022-12-23
  • 2021-11-18
  • 2021-08-06
相关资源
相似解决方案