feat: Initial commit

This commit is contained in:
2024-03-22 17:14:57 +01:00
parent dc83234df1
commit db9bafe755
45 changed files with 1996 additions and 0 deletions

26
TemiEsame/conta.c Normal file
View File

@@ -0,0 +1,26 @@
#include <string.h>
#include <stdio.h>
int conta(char *parole[], int nparole, char *cerca) {
int s = 0;
int l = strlen(cerca);
for (int i = 0; i < nparole; i++) {
char * prt = parole[i];
do {
prt = strstr(prt, cerca);
if (prt != NULL) {
prt += l;
s++;
}
} while (prt != NULL);
}
return s;
}
int main(int argc, char ** argv) {
printf("%d", conta(argv, argc-1, argv[argc-1]));
return 0;
}