首页 > 代码库 > reverse
reverse
reverse
vt.& vi.(使)反转; (使)颠倒; 掉换,交换; [法]撤消,推翻;
vi. 倒退; [桥牌]逆叫;
adj. 反面的; 颠倒的; 倒开的; [生]倒卷的;
n. 倒转,反向; [机]回动; 倒退; 失败;
#include <iostream>
using namespace std;
#include<string>
#include<algorithm>
int main(int argc, char *argv[])
{
string s="asdfjkl";
reverse( s.begin(), s.end() );
cout<<s<<endl;
return 0;
}
#include <iostream>
using namespace std;
#include<string>
#include<algorithm>
int main(int argc, char *argv[])
{
string s="abcdefgh";
s=s+‘8‘+‘9‘;
reverse( s.begin(), s.end() );
cout<<s<<endl;
return 0;
}
#include <iostream>
using namespace std;
#include<string>
#include<algorithm>
int main(int argc, char *argv[])
{
string s="abcdefgh";
s=s+‘8‘+‘9‘;
reverse( s.begin(), s.end() );
cout<< s <<endl;
cout<< s.c_str() <<endl;
return 0;
}
#include <iostream>
using namespace std;
#include<string>
#include<algorithm>
int main(int argc, char *argv[])
{
string s;
cin>>s;
s=s+‘8‘+‘9‘;
reverse( s.begin(), s.end() );
cout<<s<<endl;
cout<<s.c_str()<<endl;
return 0;
}