c program check whether a character is a vowel or not .

How do you check if a letter is a vowel in C,

 /* write a program to accept a character and check if it is vowel or not */

#include<stdio.h>

#include<conio.h>

void main()

{                char ch;

                 printf(\"n Enter a character in lower case : ");

                 scanf(" %c", &ch);

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

                 printf(" \n %c is a vowel ",ch);

                 else

                 printf(" \n %c is not a vowel ",ch);

}

/* Output:--

                 Enter a character in lower case : w

                 w is not  a vowel

*/


                        

https://www.programiz.com/c-programming/examples/vowel-consonant
                                                            

                                                                    👇💬💭😊

No comments:

Post a Comment

This Blog helps you to learn basics to high level programming coding and practicals.
conceptual understanding

c program, Advance coding, c++ program, simple program, Advance language

online quiz Application project page MCA final year project

  Here we making a quiz application ppt presentation for college project so that our project idea will like to our professor and teacher  fi...