Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created October 21, 2019 18:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/487c180b1488c80ce38e7f929ab56b43 to your computer and use it in GitHub Desktop.
Save parzibyte/487c180b1488c80ce38e7f929ab56b43 to your computer and use it in GitHub Desktop.
// Función que indica si un carácter es vocal, ¿hace falta más explicación?
int esVocal(char letra) {
// Convertir a mayúscula para evitar hacer más comparaciones
char letraEnMayuscula = (char) toupper(letra);
return letraEnMayuscula == 'A' ||
letraEnMayuscula == 'E' ||
letraEnMayuscula == 'I' ||
letraEnMayuscula == 'O' ||
letraEnMayuscula == 'U';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment