In: Electrical Engineering
Use a switch statement to write a function that returns TRUE if a character is a consonant and returns FALSE otherwise.
I have tested this program in my code block, it is working fine.
#include<stdio.h>
char choice;
void main( )
{
while(1){
        /* Printing the
available options */
        printf("Enter an
alphabet\n");
        /* Taking users input
*/
        scanf("%c",
&choice);
        switch(choice)
        {
           
case 'a':
               
printf("FALSE");
               
break;
            
           
case 'e':
               
printf("FALSE");
               
break;
            
           
case 'i':
               
printf("FALSE");
               
break;
            
           
case 'o':
               
printf("FALSE");
               
break;
           
           
case 'u':
               
printf("FALSE");
               
break;
         
           
default:
               
printf("TRUE\n");
    }
scanf("%c", &choice);
}
}