Given a number, check whether the product of digit sum and reverse of digit sum equals the number or not.
Input : 1729 Output : Yes Explanation: digit sum = 1 + 7 + 2 + 9 = 19 Reverse of digit sum = 91 Product = digit sum * Reverse of digit sum = 19 * 91 = 1729 Input : 2334 Output : No
1. Find the sum of digits of given number.
2. Reverse the digit sum output.
3. Product of digit sum and reverse of digit sum.
If product equals to the original number then print “Yes” else print “No”.
This article is contributed by Dharmendra Kumar. If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
- Maximum of sum and product of digits until number is reduced to a single digit
- Check if the first and last digit of number N is prime and their sum is less than K
- Check if the first and last digit of the smallest number forms a prime
- Count of n digit numbers whose sum of digits equals to given sum
- Print all n-digit numbers whose sum of digits equals to given sum
- Check if product of digits of a number at even and odd places is equal
- Check whether product of digits at even places of a number is divisible by K
- Digit - Product - Sequence
- Product of N with its largest odd digit
- Check if frequency of each digit is less than the digit
- First digit in product of an array of numbers
- Count of Numbers in Range where first digit is equal to last digit of the number
- Counting numbers whose difference from reverse is a product of k
- Last digit of Product of two Large or Small numbers (a * b)
- Find the remainder when First digit of a number is divided by its Last digit