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.

  1. The lowercase '{letter}' is a vowel
  2. The uppercase '{letter}' is a vowel
  3. 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.