Problem 22: Vowel

Take a small letter alphabet as input and print whether it is VOWEL or CONSONANT.

 

2,039 total views, 2 views today

Comments

comments

5 thoughts on “Problem 22: Vowel”

  1. #include
    int main()
    {
    char ch;
    ch=getchar();
    if(isupper(ch))
    ch=tolower(ch);
    if(ch==’a’||ch==’e’||ch==’i’||ch==’o’||ch==’u’)
    printf(“VOWEL\n”);
    else
    printf(“CONSONANT\n”);
    return 0;
    }

  2. #include
    int main()
    {
    char num;
    printf(“Enter a small letter\n”);
    scanf(“%c”,&num);
    if(num==’a’||num==’e’||num==’i’||num==’o’||num==’u’){
    printf(“Vowel\n”);}
    else
    printf(“Consonent\n”);
    return 0;
    }

  3. #include
    int main()
    {
    char ch;
    printf(“Enter any small letter\n”);
    scanf(“%c”,&ch);
    if(ch==’a’||ch==’e’||ch==’i’||ch==’o’||ch==’u’){
    printf(“The number is vowel\n”);
    }
    else{
    printf(“The number is consonant\n”);
    }
    }

  4. #include
    int main()
    {
    char ch;
    scanf(“%c”,&ch);
    if(ch==’a’||ch==’e’||ch==’i’||ch==’o’||ch==’u’){
    printf(“%c is Vowel\n”,ch);
    }
    else{
    printf(“%c is Consonant”,ch);
    }
    return 0;
    }

  5. #include
    int main()
    {
    char letter;
    printf(“Enter a small letter\n”);
    scanf(“%c”,&letter);
    if((letter==’a’||letter==’e’||letter==’i’||letter==’o’||letter==’u’)||(letter==’A’||letter==’E’||letter==’I’||letter==’O’||letter==’U’)){
    printf(“This letter is VOWEL\n”);
    }
    else{
    printf(“This letter is CONSONANT\n”);
    }
    return 0;
    }

Leave a Reply

Your email address will not be published.