Computer Science, asked by tapishthakur76, 8 months ago

Write a program to enter a character by the user and calculate weather it is a vowel or consonant

Answers

Answered by aarohishah264
2

Answer:

// C Program to Check Vowel or Consonant

#include <stdio.h>

int main()

{

   char ch;

   printf("Please Enter an alphabet: \n");

   scanf(" %c", &ch);

   

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

 ch == 'A' || ch == 'E' || ch == 'I' || ch == 'O' || ch == 'U')  {

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

}

   else {

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

}

   return 0;

}

Hope it will help you ....

Similar questions