Coding Exercise: Switch statement
This exercise uses a switch statement to provide feedback based on which letter is entered.
We'll cover the following
Problem
Write code for a console application that receives an alphabet from the user. The provided letter has been stored in the letter
variable. Use a switch
statement to provide the following three responses.
The lowercase '{letter}' is a vowel
The uppercase '{letter}' is a vowel
The '{letter}' is NOT a vowel
Sample input
The program will accept one parameter, char
, for example:
'b'
Expected output
The finished output of the program should look like this:
The b is NOT a vowel
Get hands-on with 1400+ tech skills courses.