用指针几行搞定(c语言) 摘要:解题思路:按题意写即可注意事项:使用gets()输入参考代码:#include<stdio.h> #include<string.h> int main() { char str[100],…… 题解列表 2022年12月24日 0 点赞 0 评论 914 浏览 评分:9.9
字符逆序c语言 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ int i; char a[1001]; gets(a); for(i=st…… 题解列表 2022年12月19日 0 点赞 0 评论 540 浏览 评分:9.9
1093: 字符逆序 ```cpp#includeusingnamespacestd;strings1;intmain(){getline(cin,s1);//intlen=strlen(s1);错误//intlen=length(s1);错误for(inti=s1.length()-1;i>=0;i--)//string 题解列表 2022年12月14日 0 点赞 0 评论 385 浏览 评分:9.9
20221123字符逆序 摘要:解题思路:注意事项:字符串长度为l,则旧/新字符串下标最大均为l-1;参考代码:#include <stdio.h>#include <string.h>int main(){ int i,j…… 题解列表 2022年11月23日 0 点赞 0 评论 454 浏览 评分:0.0
很简单· 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ int i = 0 ,j=0; char arr [100]; gets(a…… 题解列表 2022年11月19日 0 点赞 0 评论 462 浏览 评分:0.0
编写题解 1093: 字符逆序加错误反思 摘要:解题思路:注意事项:之前代码没有考虑str[i] = getchar()) != EOF and i <= 100导致一直通过不了参考代码:char str[101]; int i; …… 题解列表 2022年11月14日 0 点赞 0 评论 357 浏览 评分:0.0
最简方法字符逆序 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int i; char ch[100]; gets(ch); for(i=strlen(ch)-1;i>=…… 题解列表 2022年11月10日 0 点赞 0 评论 524 浏览 评分:9.9
1093: 字符逆序 #include#includeintmain(){chararr[100]={'\0'};fgets(arr,100,stdin);//fgets()会把读入字符串中intr=strlen(arr);if(arr[r-1]=='\n')//判断该位是\n或者EOF{r-=2;}intl=0;char 题解列表 2022年11月09日 0 点赞 0 评论 523 浏览 评分:0.0
C语言联合if语句正常解法 摘要:解题思路:无非就是一个从零开始一个从最大开始,一个递增一个递减一直互相交换字符注意事项:这里面交换字符的中间量记得用char参考代码:#include<stdio.h>#include<string.…… 题解列表 2022年11月01日 0 点赞 0 评论 486 浏览 评分:9.9