解题思路:
注意事项:就是迭代器调换位置,注意包含头文件
参考代码:
#include<iostream>
#include <cstring>
#include <stdlib.h>
#include <algorithm>
using namespace std;
int main()
{
string str, str1;
getline(cin, str);
reverse(str.begin(), str.end());
cout << str << endl;
return 0;
}
0.0分
1 人评分
C语言程序设计教程(第三版)课后习题6.7 (C语言代码)浏览:526 |
C语言程序设计教程(第三版)课后习题6.5 (C语言代码)浏览:764 |
C语言程序设计教程(第三版)课后习题7.1 (C语言代码)浏览:628 |
【计算两点间的距离】 (C语言代码)浏览:1503 |
C语言程序设计教程(第三版)课后习题4.9 (C语言代码)浏览:574 |
C语言程序设计教程(第三版)课后习题6.9 (C语言代码)浏览:602 |
简单的a+b (C语言代码)浏览:838 |
A+B for Input-Output Practice (IV) (C语言代码)浏览:519 |
小O的乘积 (C语言代码)浏览:1026 |
三进制小数 (C语言代码)浏览:847 |