Write a program that prompts the user to provide a single character from the alp
ID: 3628955 • Letter: W
Question
Write a program that prompts the user to provide a single character from the alphabet. Print "vowel", or "consonant" depending on the user input. The program prints "error" if-the user input is not a letter (between a and z, or A and Z), or
-the user input is a string of length>1
Explanation / Answer
What language are you writing it in? The logic/outline of the program for any language is as follows: //Remember to include any classes/libraries that you need print "enter a character"; get the character from the input; if(character length is > 1 OR || character isn't a letter ex: isalpha(character) for C++ or character.isLetter() for Java, etc.)) print "error"; if( character == "a" OR character == "A" OR character == "e" OR character == vowel etc.) print "vowel"; else print "consonant"; Hope this helps.