最简单方法去掉空格(C语言) 摘要:解题思路:创建一个数组循环从键盘输入字符串,包括空格回车,遇到EOF时终止,输出时循环输出,遇到空格用continue跳过这次循环继续输出。注意事项:从键盘输入EOF的方法为ctrl+z再回车参考代码…… 题解列表 2021年06月10日 0 点赞 0 评论 388 浏览 评分:8.0
优质题解 去掉空格(C语言 精简!) 摘要:解题思路: 利用gets()返回值(非0为真)作为while循环条件解决多行输出问题利用指针变量p对字符串进行遍历,到\0停止遍历注意事项: *++p!='\0' 是先执行++…… 题解列表 2023年07月30日 0 点赞 3 评论 1699 浏览 评分:8.3
去掉空格-题解(C++代码) 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<string>using namespace std;int main() { string a; while (g…… 题解列表 2020年11月25日 0 点赞 0 评论 671 浏览 评分:8.4
题解 1196: 去掉空格 摘要:#include #include void fun(char str[]){ int j; int length = strlen(str); for (int …… 题解列表 2025年02月26日 3 点赞 0 评论 502 浏览 评分:8.7
金帅君~~题解1196:去掉空格 (C++代码) 摘要:解题思路: 1. 每遇到一个空格(下标为i),从i到len-2,前=后注意事项: 2.记得len--;参考代码:#include <i 题解列表 2018年03月21日 4 点赞 0 评论 1191 浏览 评分:8.9
去掉空格 简单明了 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include#define N 100int main(){ char a[100]; int i,j; i=0;j=0; while(get…… 题解列表 2020年11月19日 0 点赞 4 评论 913 浏览 评分:8.9
去掉空格-题解(Python代码)-replace替换 摘要:解题思路:replace替换参考代码:s = input() while s != 'End of file': print(s.replace(' ',&…… 题解列表 2021年01月21日 0 点赞 0 评论 699 浏览 评分:8.9
去掉空格-题解(C++代码) 摘要: #include #include #include using namespace std; const int maxn=100; int…… 题解列表 2019年12月30日 0 点赞 0 评论 1220 浏览 评分:9.0
去掉空格-题解(C语言代码) 摘要: #include int main () { int i=0; char a[80]; while((a[i]=getchar())…… 题解列表 2020年03月04日 0 点赞 0 评论 867 浏览 评分:9.0