题解 1093: 字符逆序

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

筛选

SinzoL--题解 1093: 字符逆序

####我是新手,这里只是把让字符逆序的两种方式给罗列了一下###第一种:用string变量```cpp#include#include#includeusingnamespacestd;stringword;intmain(){getline(cin,

1093: 字符逆序

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;string s;int main(){    getline(cin,s); fo……
优质题解

1093: 字符逆序

摘要:解题思路:(1)利用反向迭代器reverse_iterator:rbegin() 和 rend(),比如:string str1("1234567890"); string str2(str1.rb……

1093: 字符逆序

```cpp#includeusingnamespacestd;intmain(){charstr[100];gets(str);//用gets输入的字符串可以按回车结束intk=strlen(str);for(intw=k-1;w>=0;w--){cout

1093: 字符逆序(c++)

摘要:解题思路:注意事项:主义头文件#include<string>参考代码:#include <iostream>#include<string>using namespace std;int main(……

1093: 字符逆序

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

超简短,通俗易懂的代码

摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){    char s[109];    int len;  ……

字符逆序的两种解法

摘要:解题思路:提供两种方法:    ①字符串逆序,仅需从后往前输出字符串即可;    ②定义两个字符串,将输入的字符串的末尾赋给另一个字符串的前端。注意事项 :    ①string类型的通过getlin……

!!!???!!!疑惑 为什么不对

我自己跑出来的代码功能是没问题的但是提交始终给我报错误0,不知道为什么```cpp#includeusingnamespacestd;intmain(){chara[200];gets(a);stringb=a;for(inti=b.length();i>=0;i--){cout

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

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