Last active
October 21, 2019 18:58
-
-
Save parzibyte/22635974bdc8dc5b61f2bbc1d5fa488f 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 contarConsonantes(char cadena[]) { | |
int consonantes = 0;// Almacenar la cantidad de consonantes | |
int i = 0;// El índice para recorrer la cadena | |
while (cadena[i]) { | |
// Si es del alfabeto pero no es vocal | |
if (isalpha(cadena[i]) && !esVocal(cadena[i])) { | |
consonantes++; | |
} | |
i++; | |
} | |
return consonantes; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment