Ejemplo n.º 1
0
        public void CountWords()
        {
            Console.WriteLine("Enter the string to count words:");
            string str     = Console.ReadLine();
            var    taskRun = new WorkWithString();

            Console.WriteLine($"\nNumber of words is {taskRun.CountWords(str)}\n");
        }
Ejemplo n.º 2
0
        public void CheckPalindrom()
        {
            Console.WriteLine("Enter the string to check palindrom:");
            string str     = Console.ReadLine();
            var    taskRun = new WorkWithString();

            if (taskRun.IsPalindrom(str))
            {
                Console.WriteLine("\nThe string is palindrom!\n");
            }
            else
            {
                Console.WriteLine("\nThe string isn't palindrom!\n");
            }
        }