Hifipsysta-1126题-字符串正反连接(C++代码)善用字符串加法 ```cpp#include#include#includeusingnamespacestd;intmain(){stringstr1,str2="";getline(cin,str1);for(inti=str1.size()-1;i>=0;i--){str2+=str1[i];}cout 题解列表 2022年01月26日 0 点赞 0 评论 491 浏览 评分:0.0
[Sapphire]1126:字符串正反连接(C语言代码) 摘要:解题思路:用新数组接收反转过后的原数组元素即可。注意事项:1.用joe[k]='\0'结束。参考代码:#include<stdio.h> #include<string.h> in…… 题解列表 2022年02月16日 0 点赞 0 评论 653 浏览 评分:9.9
1126: C语言训练-字符串正反连接(c语言5种解法) 摘要:解题思路: 反转加追加注意事项: 个人推荐解法3,简单易懂参考代码://1、流氓输出: #include<stdio.h> #include<string.h> int main() { …… 题解列表 2022年03月06日 0 点赞 0 评论 1586 浏览 评分:9.9
写题解 1126: C语言训练-字符串正反连接 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ int m,i; char str[51]; gets(str); m=st…… 题解列表 2022年03月09日 0 点赞 0 评论 637 浏览 评分:0.0
编写题解 1126: C语言训练-字符串正反连接 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ string str; cin>>str; cout…… 题解列表 2022年03月26日 0 点赞 0 评论 634 浏览 评分:0.0
纯新手,来看看呀QAQ 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int i,j,k; char a[100],b[100]; gets(a); for…… 题解列表 2022年04月17日 0 点赞 0 评论 475 浏览 评分:0.0
1126: C语言训练-字符串正反连接 摘要:解题思路:注意事项:参考代码:#include<stdio.h> int main() { char str[50]; gets(str); printf("%s",str); int l…… 题解列表 2022年06月23日 0 点赞 0 评论 466 浏览 评分:0.0
题解 1126: C语言训练-字符串正反连接(C语言) #C语言:字符串正反连接##题目所给字符串正序和反序连接,形成新串并输出。##主要步骤-gets函数输入字符串,存入数组a中-将a的元素反序存入数组b中-strcat函数连接a,b数组输出即可##完整参考代码```c#include#includeintmain(void){chara[100];ch 题解列表 2022年08月26日 0 点赞 0 评论 609 浏览 评分:0.0
1126: C语言训练-字符串正反连接 ```cpp#include#includeusingnamespacestd;intmain(){charch1[50],ch2[50];gets(ch1);for(inti=strlen(ch1)-1;i>=0;i--)ch2[i]=ch1[strlen(ch1)-1-i];strcat(ch1, 题解列表 2022年09月22日 0 点赞 0 评论 998 浏览 评分:9.9
先左到右遍历,再右到左,最后输出 摘要:```c #include #include int main(){ char s[110]; scanf("%s",s); int len=strlen(s); for(i…… 题解列表 2022年10月03日 0 点赞 0 评论 546 浏览 评分:0.0