Rotate your phone or change to desktop for better experience

Rotate your phone or change to desktop for better experience

C Program to check whether character is vowel or not

 // C Program to check whether character is vowel or not


#include <stdio.h>


int main()

{

 char ch;

 printf("enter a character : ");

 scanf("%c",&ch);

 

 if ( ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u' )

 {

     printf("character %c is vowel",ch);

 }

 else 

 {

     printf("character %c is not vowel",ch);

 }

 

 return 0;

    

}


HERE:

you can also use switch statement for this program and this programs only work if u enter lower case characters or u have to add one more else if condition 

peace out...

Post a Comment

0 Comments