This commit is contained in:
2025-04-21 00:40:30 +02:00
parent 9ccc21edde
commit b8c75fc6d3
87 changed files with 2788 additions and 99 deletions

22
S1/GdCP/a01.c Normal file
View File

@@ -0,0 +1,22 @@
#include<stdlib.h>
#include<ctype.h>
#include<string.h>
void pop(char *s, char *p) {
int l = strlen(s) - 1;
for (int i = p - s; i < l; i++) s[i] = s[i+1];
s[l] = '\0';
}
int strclean(char *t) {
if (!t) return -1;
int count = 0, ind = 0;
while (t[ind] != '\0') {
if (!isgraph(t[ind])) {
pop(t, t + ind); count++;
} else ind++;
}
return count;
}