#include <cstring>
using namespace std;
namespace my_name
{
string s1;
void fun(string& s1)
{
int len=s1.size();
int j=len-1;
int i=0;
while(i<j)
{
char c=s1[i];
s1[i]=s1[j];
s1[j]=c;
i++;j--;
}
}
}
using namespace my_name;
int main()
{
cout<<"请输入字符串"<<endl;
cin >> s1;
fun(s1);
cout << s1<<endl;
return 0;
}
527啊啊啊啊啊
最新推荐文章于 2024-11-05 01:41:28 发布