Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            Console.Write("Enter a character: ");
            String s = Console.ReadLine();

            if (s.Length > 0)
            {
                char c = s[0];
                if (Vowel.IsVowel(c))
                {
                    Console.WriteLine(c + " is a vowel");
                }
                else
                {
                    Console.WriteLine(c + " is a NOT vowel");
                }
            }
            else
            {
                Console.WriteLine("nothing is entered");
            }

            //Select this exercise as the startup project
            //press CTRL-F5 to run the program
        }
Ejemplo n.º 2
0
        public void TestIfIsVowel()
        {
            var vowel = "a";
            var v     = new Vowel(vowel);

            Assert.IsTrue(v.IsVowel());
        }