Answer to Question #278854 in C# for Mells

Question #278854

C# Write a program that determines if the input letter is a VOWEL or CONSONANT. The vowels is are: A E I O U. Your program must be able to handle a capital or small input letter.


1
Expert's answer
2021-12-12T12:18:58-0500
using System;
using System.Collections.Generic;


namespace App
{
   
    class Program
    {
        public static void Main()
        {
            Console.Write("Enter the letter: ");
            char letter = Console.ReadLine().ToUpper()[0];
            if (letter == 'A' || letter == 'E' || letter == 'I' || letter == 'O' || letter == 'U')
            {
                Console.WriteLine("Letter is a VOWEL.");
            }
            else {
                Console.WriteLine("Letter is a CONSONANT.");
            }
            




            Console.ReadLine();
        }
    }
}

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 the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS