Esempio n. 1
0
        static void Recursion()
        {
            Console.WriteLine("test :: " + RecursionTools.IsPalindrome("test"));
            Console.WriteLine("radar :: " + RecursionTools.IsPalindrome("radar"));
            Console.WriteLine("raddar :: " + RecursionTools.IsPalindrome("raddar"));
            Console.WriteLine("regninger :: " + RecursionTools.IsPalindrome("regninger"));

            Console.WriteLine("5^3 = " + RecursionTools.Power(5, 3));

            Console.WriteLine($"5! = {RecursionTools.Factorial(5)}");
        }
Esempio n. 2
0
 public static bool IsPalindrome(this string str)
 {
     return(RecursionTools.IsPalindrome(str));
 }