1.

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

Answer»

// C Program to CHECK VOWEL or Consonant #include 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 ....



Discussion

No Comment Found