去掉空格-题解【C++描述】思路简单,讲解详细 摘要:①头文件中的 的区别,第一个是一个类,可以通过string str定义一个string类型的变量,不是C语言中的(包含strlen() strcpy()等函数)在C++中的别称,才是在C++中的“别…… 题解列表 2020年04月09日 0 点赞 0 评论 611 浏览 评分:8.0
最简单方法去掉空格(C语言) 摘要:解题思路:创建一个数组循环从键盘输入字符串,包括空格回车,遇到EOF时终止,输出时循环输出,遇到空格用continue跳过这次循环继续输出。注意事项:从键盘输入EOF的方法为ctrl+z再回车参考代码…… 题解列表 2021年06月10日 0 点赞 0 评论 281 浏览 评分:8.0
题解 1196: 去掉空格 摘要:#include #include void fun(char str[]){ int j; int length = strlen(str); for (int …… 题解列表 2025年02月26日 2 点赞 0 评论 338 浏览 评分:8.0
优质题解 去掉空格(C语言 精简!) 摘要:解题思路: 利用gets()返回值(非0为真)作为while循环条件解决多行输出问题利用指针变量p对字符串进行遍历,到\0停止遍历注意事项: *++p!='\0' 是先执行++…… 题解列表 2023年07月30日 0 点赞 3 评论 1509 浏览 评分:8.3
去掉空格-题解(C++代码) 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<string>using namespace std;int main() { string a; while (g…… 题解列表 2020年11月25日 0 点赞 0 评论 556 浏览 评分:8.4
金帅君~~题解1196:去掉空格 (C++代码) 摘要:解题思路: 1. 每遇到一个空格(下标为i),从i到len-2,前=后注意事项: 2.记得len--;参考代码:#include <i 题解列表 2018年03月21日 4 点赞 0 评论 1094 浏览 评分: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 评论 775 浏览 评分:8.9
去掉空格-题解(Python代码)-replace替换 摘要:解题思路:replace替换参考代码:s = input() while s != 'End of file': print(s.replace(' ',&…… 题解列表 2021年01月21日 0 点赞 0 评论 571 浏览 评分:8.9
去掉空格-题解(C++代码) 摘要: #include #include #include using namespace std; const int maxn=100; int…… 题解列表 2019年12月30日 0 点赞 0 评论 941 浏览 评分:9.0