Exemplo n.º 1
0
        public static void RunAnalgram()
        {
            string word1, word2;

            Console.WriteLine("Enter the first word and press enter");
            word1 = Console.ReadLine();
            Console.WriteLine("Enter the second word and press enter");
            word2 = Console.ReadLine();

            Anagram ag         = new Anagram();
            bool    isAnagram  = ag.AreWordsAnagram(word1, word2);
            string  outputText = string.Empty;

            if (isAnagram)
            {
                outputText = "Both words are analgram";
            }
            else
            {
                outputText = "Both words are not analgram";
            }

            Console.WriteLine(outputText);
        }