这个题不考虑空格——第一个测试点不通过的原因 摘要:解题思路:之前用getchar()获得字符(\n结束),统计长度后正反各输出一次。然后第一个测试点死活不通过。红温过后使用scanf("%s",&str)即可。注意事项:呕…… 题解列表 2025年06月05日 0 点赞 0 评论 338 浏览 评分:0.0
C语言训练-字符串正反连接(c) 摘要:#include <stdio.h>#include <string.h>int main(){ char a[120]; int x,j=0,i; gets(a); x=st…… 题解列表 2025年02月09日 1 点赞 0 评论 357 浏览 评分:10.0
掌握反向迭代就行 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<string>using namespace std;int main(){ string input; …… 题解列表 2024年12月08日 0 点赞 0 评论 312 浏览 评分:0.0
字符串正反接 摘要:解题思路:注意事项:参考#include <stdio.h>#include <string.h>int main(){ char a[101]; int i, j; // 使用fg…… 题解列表 2024年11月25日 1 点赞 0 评论 357 浏览 评分:6.0
最普通的解题方法 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ char a[120]; char b[52]; int i,c=0,j; gets(a…… 题解列表 2024年11月17日 0 点赞 0 评论 301 浏览 评分:0.0
旧物有情 # 字符串正反连接 超简单思路 摘要:``` #include #include #include using namespace std; int n,jin,yin,tong; int main(){ ch…… 题解列表 2024年10月17日 0 点赞 0 评论 196 浏览 评分:0.0
C语言训练-字符串正反连接 摘要:解题思路:string reverse注意事项:参考代码:#include<iostream> #include<cstdio> #include<string> #include<algori…… 题解列表 2024年08月11日 1 点赞 0 评论 347 浏览 评分:0.0
多种方法解决,不使用string头文件的解法也有(c语言代码) 摘要:**1)不使用数组,这种做法其实不符合题意,因为你没有连接,你的原数组没有变化** ```c #include #include int main(){ char s[50]; …… 题解列表 2024年08月08日 0 点赞 0 评论 253 浏览 评分:9.9
--------------------字符串拼接------------------------------字符串倒序---------- 摘要:解题思路:注意事项:参考代码:#include <stdio.h> #include<string.h> void strcat_custom(char* dest, const char* …… 题解列表 2024年08月03日 0 点赞 0 评论 208 浏览 评分:9.9
傻瓜式解决方法 摘要:倒序输出的思路可以从数字类比/图形输出类比就是要将一个过程拆成正反过程 这里类比就是改变循环条件,将循环倒过来 #include #include int main() { i…… 题解列表 2024年06月18日 0 点赞 0 评论 364 浏览 评分:2.0