-
-
Save parzibyte/5d9b354340dead8f25946c37fbccb309 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int contieneAlMenosUnNumero(char cadena[MAXIMA_LONGITUD_CADENA]) | |
{ | |
int indice = 0; | |
while (cadena[indice] != '\0') | |
{ | |
char actual = cadena[indice]; | |
if (isdigit(actual)) | |
{ | |
return 1; | |
} | |
indice++; | |
} | |
return 0; | |
} | |
int contieneAlMenosUnaLetra(char cadena[MAXIMA_LONGITUD_CADENA]) | |
{ | |
int indice = 0; | |
while (cadena[indice] != '\0') | |
{ | |
char actual = cadena[indice]; | |
if (isalpha(actual)) | |
{ | |
return 1; | |
} | |
indice++; | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment