#include <iostream>
#include <cstring>
using namespace std;
namespace mysapce {
string s1;
void FUN(string s1)
{
string s2;
int sl;
sl=s1.size();
char str[64];
strcpy(str,s1.c_str());
for(int i=0,j=sl;i<j;i++,j--)
{
char t=str[i];
str[i]=str[j];
str[j]=t;
}
for(int i=0;i<=sl;i++)
{
cout << str[i];
}
cout << endl;
strcpy((char*)s2.data(),str);
cout << "s2=" << s2 << endl;
}
}
using namespace mysapce;
int main()
{
getline(cin,mysapce::s1);
mysapce::FUN(s1);
return 0;
}
527作业
最新推荐文章于 2024-10-12 11:03:43 发布