题解 2005: 去除空格

来看看其他人写的题解吧!要先自己动手做才会有提高哦! 
返回题目 | 我来写题解

筛选

去除空格-题解(C++代码)

摘要:解题思路:利用字符串erase函数,删除空格并输出注意事项:参考代码:#include<iostream> #include"string" #include"algorithm" using ……

2005: 去除空格

摘要:#include <bits/stdc++.h> using namespace std; int main(){     string s;     getline(cin,s);  ……

2005: 去除空格

摘要:解题思路:数组元素左移注意事项:参考代码:#include <stdio.h> #define LEN 1000 int main(){ char str[LEN]={&#39;\0&#39;……

去除空格c语言解法

摘要:解题思路:把空格的那个位置置0,输出的时候输出非0即可注意事项:输入的时候用gets()参考代码:#include <stdio.h>#include <string.h> int main(){ch……