예제 #1
0
        static void Main(string[] args)
        {
            const string NAME    = "BARLAN 123456789";
            const string VOWEL   = "AEIOU";
            const string NUM     = "0123456789";
            const string SURNAME = "URIZARTORRICO";


            foreach (var surname in SURNAME)
            {
                if (VOWEL.IndexOf(surname) >= 0)
                {
                    Console.WriteLine("The letter " + surname + " is vowel");
                }
                else if (NUM.IndexOf(surname) >= 0)
                {
                    Console.WriteLine("The names of the persons not content numbers ");
                }
                else
                {
                    Console.WriteLine("The letter " + surname + " is a consonat");
                }
            }
            foreach (var name in NAME)
            {
                if (NUM.IndexOf(name) >= 0)
                {
                    Console.WriteLine(name + " People's name doesn't have  a number");
                }
                else if (NAME.IndexOf(name) >= 0)
                {
                    Console.WriteLine();
                }
                else
                {
                    Console.WriteLine("The letter " + name + " is a consonat");
                }
            }
        }