Answer to Question #73087 in C for tilu
c program for vowel or not
1
2018-02-01T05:18:01-0500
#include <stdio.h>
#include <ctype.h>
int main()
{
char ch;
printf("Please enter a letter (0-end): ");
scanf("%c", &ch);
if (!isalpha(ch)) {
printf("Not a letter\n");
}
else
{
if (ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u' || ch == 'y'
|| ch == 'A' || ch == 'E' || ch == 'I' || ch == 'O' || ch == 'U' || ch == 'Y')
{
printf("%c is a vowel\n", ch);
}
else
{
printf("%c is not a vowel\n", ch);
}
}
return 0;
}
Need a fast expert's response?
Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Learn more about our help with Assignments:
C
Comments
Leave a comment