Given an integer N, the task is to check whether the sum of digits of N is palindrome or not.
Input: N = 56
Digit sum is (5 + 6) = 11
which is a palindrome.
Input: N = 51241
(5 + 1 + 2 + 4 + 1) = 13
Approach: Find the sum of digits of N and store it in a variable sum. Now check whether sum is palindrome or not using the approach discussed in this article.
Below is the implementation of the above approach:
- Check if a number with even number of digits is palindrome or not
- N'th palindrome of K digits
- Check whether product of digits at even places is divisible by sum of digits at odd place of a number
- Find all palindrome numbers of given digits
- Smallest and Largest Palindrome with N Digits
- Make largest palindrome by changing at most K-digits
- Count the number of digits of palindrome numbers in an array
- Check if the sum of digits of number is divisible by all of its digits
- Check if a number is Palindrome
- Check if a number is Palindrome in PL/SQL
- C Program to Check if a Given String is Palindrome
- Check if all elements of the array are palindrome or not
- Program to check the number is Palindrome or not
- Check if a string is palindrome in C using pointers
- Check if a given string is a rotation of a palindrome
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.