write a program to check whether inputted alphabet is vowel or not using switch case
1
Expert's answer
2014-09-23T04:54:18-0400
using System; namespace Question {
class Program { static void Main(string[] args) { ConsoleKeyInfo key; do { Console.Clear(); Console.WriteLine("Input your alphabet symbol(ESC - exit): "); key = Console.ReadKey(); if (key.Key == ConsoleKey.Escape) return; Console.WriteLine(); switch(char.ToLower(key.KeyChar)) { case 'e': Console.WriteLine("Inputed alphabet symbol is vowel");break; case 'y': Console.WriteLine("Inputed alphabet symbol is vowel");break; case 'i': Console.WriteLine("Inputed alphabet symbol is vowel");break; case 'o': Console.WriteLine("Inputed alphabet symbol is vowel");break; case 'a': Console.WriteLine("Inputed alphabet symbol is vowel");break; default: Console.WriteLine("Inputed alphabet symbol isn`t a vowel");break; } Console.WriteLine("Press any key to continue..."); Console.ReadKey(); }while(true); } } }
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments
Leave a comment