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. If
Write a program that prompts the user to provide a single character from the alphabet. Print "Vowel" or "Consonant", depending on the
user input. If the user input is not a letter between a and z or A and Z or is a string of length print the error message "Input is not a
single character".
Vowels are the letters a e o u i Any other letter is a consonant.
The following are sample runs of demonstrate the program:
Sample run :
Please enter a single character:
a
Vowel
Sample run :
Please enter a single character:
Consonant
Sample run :
Please enter a single character:
hello
Input is not a single character
Note: Use java language
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
