SinzoL--题解 1093: 字符逆序 ####我是新手,这里只是把让字符逆序的两种方式给罗列了一下###第一种:用string变量```cpp#include#include#includeusingnamespacestd;stringword;intmain(){getline(cin, 题解列表 2022年06月28日 0 点赞 0 评论 781 浏览 评分:9.9
1093: 字符逆序 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;string s;int main(){ getline(cin,s); fo…… 题解列表 2022年05月13日 0 点赞 0 评论 512 浏览 评分:0.0
优质题解 1093: 字符逆序 摘要:解题思路:(1)利用反向迭代器reverse_iterator:rbegin() 和 rend(),比如:string str1("1234567890"); string str2(str1.rb…… 题解列表 2022年04月25日 1 点赞 0 评论 3128 浏览 评分:9.8
1093: 字符逆序 ```cpp#includeusingnamespacestd;intmain(){charstr[100];gets(str);//用gets输入的字符串可以按回车结束intk=strlen(str);for(intw=k-1;w>=0;w--){cout 题解列表 2022年03月07日 0 点赞 0 评论 510 浏览 评分:0.0
1093: 字符逆序(c++) 摘要:解题思路:注意事项:主义头文件#include<string>参考代码:#include <iostream>#include<string>using namespace std;int main(…… 题解列表 2022年01月24日 0 点赞 0 评论 617 浏览 评分:9.9
1093: 字符逆序 摘要:直接用 reverse 函数将字符串逆序。#include <bits/stdc++.h> using namespace std; int main() { string s; …… 题解列表 2021年12月23日 0 点赞 0 评论 581 浏览 评分:0.0
超简短,通俗易懂的代码 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ char s[109]; int len; …… 题解列表 2021年12月09日 0 点赞 0 评论 656 浏览 评分:9.9
字符逆序的两种解法 摘要:解题思路:提供两种方法: ①字符串逆序,仅需从后往前输出字符串即可; ②定义两个字符串,将输入的字符串的末尾赋给另一个字符串的前端。注意事项 : ①string类型的通过getlin…… 题解列表 2021年05月02日 0 点赞 0 评论 883 浏览 评分:9.9
!!!???!!!疑惑 为什么不对 我自己跑出来的代码功能是没问题的但是提交始终给我报错误0,不知道为什么```cpp#includeusingnamespacestd;intmain(){chara[200];gets(a);stringb=a;for(inti=b.length();i>=0;i--){cout 题解列表 2021年03月27日 0 点赞 1 评论 1014 浏览 评分:0.0
字符逆序cin.get(str,100); 摘要:#include#includeusing namespace std;int main(){ char str[100]; cin.get(str,100);//gets(str); …… 题解列表 2021年03月23日 0 点赞 0 评论 1015 浏览 评分:0.0