/*__________________________________________________________

   Libro: EMPEZAR DE CERO A PROGRAMAR EN LENGUAJE C
   Ejercicio Propuesto 12.4: De vocal minúscula a mayúscula
                             (Solución 2)
                             
   Web del Autor: http://www.carlospes.com
  __________________________________________________________*/

#include <stdio.h>

int main()
{
   char  mayuscula, vocal;

   printf( "\n   Introduzca una vocal minuscula: " );
   scanf( "%c", &vocal );

   switch ( vocal )
   {
      case 'a' : mayuscula = 'A';
                 break;
      case 'e' : mayuscula = 'E';
                 break;
      case 'i' : mayuscula = 'I';
                 break;
      case 'o' : mayuscula = 'O';
                 break;
      case 'u' : mayuscula = 'U';
   }

   if ( vocal == 'a' || vocal == 'e' || vocal == 'i' || vocal == 'o' ||
        vocal == 'u' )
      printf( "\n   %c", mayuscula );
   else
     printf( "\n   ERROR: '%c' no es una vocal minuscula.", vocal );

   return 0;
}