#include int mystrlen(char *s) { int n = 0; while (s[n]) n++; return n; } int mystrcpy(char *dest, char *fuente) { while (*dest++ = *fuente++); } int main() { char line[132]; for (;;) { printf("¿? "); if (!fgets(line, sizeof line, stdin)) return 0; char *t = line; for (char *s = line; *s; s++) { // Is this character a duplicate of one we've already accepted? for (char *u = line; u < t; u++) { if (*s == *u) goto buenoestuprograma; } *t++ = *s; buenoestuprograma:; } *t = '\0'; printf("%d: ¡%s!\n", mystrlen(line), line); } }