#include <iostream>
#include <string>
using namespace std;

void SetStr(string &str)
{
	int len=str.length();
	char temp;
	for (int i=0;i<len/2;i++)
	{//把字符串的两边一一调换
		temp=str[i];
		str[i]=str[len-1-i];
		str[len-1-i]=temp;
	}
}

int main()
{
	string a;
	cout<<"input"<<endl;
	cin>>a;
	SetStr(a);
	cout<<a<<endl;
	return 0;
}

相关文章:

  • 2022-12-23
  • 2021-04-14
  • 2022-12-23
  • 2021-12-24
  • 2022-12-23
  • 2021-11-19
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-10
  • 2022-12-23
  • 2022-12-23
  • 2021-06-05
相关资源
相似解决方案