Jump to content

Featured Replies

Posted

Write a program that checks whether a given number is a palindrome. A palindrome number reads the same backward as forward (e.g., 121, 12321).

Basic Requirements:

  1. Accept numeric input from the user.

  2. Check if the number is a palindrome.

  3. Display True if it’s a palindrome and False otherwise.


Bonus Features:

  • Extend the program to check binary representations of the number for palindromic properties.

  • Add the ability to handle negative numbers (e.g., -121 should return False).

  • Allow users to check multiple numbers in one run.


Example Output:

Enter a number: 12321
True (It's a palindrome!)

Enter a number: 12345
False (Not a palindrome)

Enter a number: 9
True (It's a palindrome!)
  • Views 83
  • Created
  • Last Reply

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Important Information

Terms of Use Privacy Policy Guidelines We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.