Computer for SEE and NEB

It is a complete SEE and NEB solution for computer science. It includes Computer Fundamentals, Database (SQL), Programming in C QBASIC, CSS, JavaScript, and PHP for beginners.

Breaking

Post Top Ad

Your Ad Spot

Saturday, July 16, 2022

C Program to Check Whether an Input Character is a Vowel or Consonant

 C Program to Check Whether an Input Character is a Vowel or Consonant


#include<stdio.h>

#include<conio.h>

main()

{

char ch;

printf("Enter any character=");

scanf("%c",ch);

if(ch=='a'||ch=='e'||ch=='i'||ch=='o'||ch=='u'||ch=='A'||ch=='E'||ch=='O'||ch=='I'||ch=='U')

printf("vowel");

else

printf("consonant");

getch();

}

No comments:

Post a Comment

Post Top Ad

Your Ad Spot

Pages