Answers for "vowels and consonants in c"

C
0

vowel or consonant in c

// vowel or consonant check program
#include <stdio.h>
int main()
{
    char ch;
    ch = getchar();
    if (ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u')
    {
        printf("%c is Voweln", ch);
    }
    else
    {
        printf("%c is consonantn", ch);
    }
    return 0;
}
Posted by: Guest on July-08-2021
0

c program to print vowels or consonants using if-else

#include <stdio.h>
int main() 
{
char c;
int small, big;
printf("Enter the letter");
scanf("%c", &c);
small = (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u');
big = (c == 'A' || c == 'E' || c == 'I' || c == 'O' || c == 'U');
if (small || big)
printf("%c is a vowel", c);
else
printf("%c is a consonant", c);
return 0;
}
Posted by: Guest on July-07-2021

Code answers related to "vowels and consonants in c"

Code answers related to "C"

Browse Popular Code Answers by Language