63 126
Assignments Done
99,1%
Successfully Done
In July 2018

Answer to Question #73087 in C for tilu

Question #73087
c program for vowel or not
Expert's answer

#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!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions