![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C++
苦练算法的涛
南理工网络安全专业的学渣
展开
-
4
#include<string.h>#include<algorithm>#include "iostream"using namespace std;void swap(char p[],char q[]){ int num1=strlen(p); int num2=strlen(q); int num=num1>num2?num1:num2; for(int i=0;i<num;i++){ char temp原创 2020-12-04 15:12:03 · 123 阅读 · 0 评论 -
C++作业——去除字符串中空格
#include<string.h>#include <iostream>using namespace std;void trim1(char p[]) { int num = strlen(p); int k = 0; for (int i = 0; p[i] != '\0';) { if (p[i] == ' ') { for (int j = i + 1; p[j] != '\0'; j++) {原创 2020-12-03 22:54:18 · 1760 阅读 · 0 评论