题解 1093: 字符逆序

来看看其他人写的题解吧!要先自己动手做才会有提高哦! 
返回题目 | 我来写题解

筛选

字符逆序 (C++代码)

摘要:解题思路: 该题主要是考虑到要算上空格的个数,才是字符串的总长度。注意事项:不能使用scanf()输入,而是要改为gets()的字符串输入格式,然后使用strlen()函数,求其字符串长度。参考代码:……

字符逆序 (C++代码)

摘要:解题思路:algorithm头文件注意事项:参考代码:#include <iostream>#include <algorithm>#include <string> using namespace ……

字符逆序 (C++代码)

摘要:解题思路:注意事项:参考代码:#include <iostream> #include <string.h> using namespace std; int main() { c……

字符逆序cin.get(str,100);

摘要:#include#includeusing namespace std;int main(){    char str[100];    cin.get(str,100);//gets(str);  ……

字符逆序 (C++代码)

摘要:解题思路:把数组逆序输出注意事项:有空格,用gets()输入cin不识别控制符参考代码:#include<iostream>#include<string.h>#include<cstdio>usin……

1093: 字符逆序

摘要:直接用 reverse 函数将字符串逆序。#include <bits/stdc++.h> using namespace std; int main() {     string s; ……