Answer to Question #46357 in C# for Dipini Nayak

Question #46357
write a program to check whether given alphabet is vowel or not using switch case
1
Expert's answer
2014-09-23T04:53:18-0400
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace quesVowel
{
class Program
{
static void Main(string[] args)
{
string character;
Console.WriteLine("Enter the character");
character = Console.ReadLine();
switch (character)
{
case "A":
case "a":
case "E":
case "e":
case "I":
case "i":
case "O":
case "o":
case "U":
case "u":
Console.WriteLine(character + " is a vowel");
break;
default:
Console.WriteLine(character + " is not a vowel");
break;
}

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
New on Blog
APPROVED BY CLIENTS