コード例 #1
0
        static void Main()
        {
            Console.WriteLine("Enter a word and we'll check whether it's a palindrome or not!");
            string userInput = Console.ReadLine();
            bool   result    = Palindromes.isPalindrome(userInput);

            if (result)
            {
                Console.WriteLine("This is a palindrome.");
            }
            else
            {
                Console.WriteLine("This is not a palindrome.");
            }
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: jordanHS/palindrome-CSharp
        public static void Main()
        {
            Console.WriteLine("Type a word and we'll check wehter it's a palindrome.");
            string userInput = Console.ReadLine();
            // Palindromes palindrome = new Palindromes(userInput);
            bool result = Palindromes.isPalindrome(userInput);

            if (result)
            {
                Console.WriteLine("This is a palindrome.");
            }
            else
            {
                Console.WriteLine("This is NOT a palindrome.");
            }
        }
コード例 #3
0
        static void Main(string[] args)
        {
            Palindromes checkTheseTwo = new Palindromes("racecar", "racecar");

            checkTheseTwo.IsPalindrome();
        }