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
- Print all n-digit numbers whose sum of digits equals to given sum
- Count of n digit numbers whose sum of digits equals to given sum
- Check if the first and last digit of the smallest number forms a prime
- Check whether product of digits at even places of a number is divisible by K
- Check if frequency of each digit is less than the digit
- Digit - Product - Sequence
- Product of N with its largest odd digit
- First digit in product of an array of numbers
- Counting numbers whose difference from reverse is a product of k
- Count of Numbers in Range where first digit is equal to last digit of the number
- Largest number less than N with digit sum greater than the digit sum of N
- Check whether product of digits at even places is divisible by sum of digits at odd place of a number
- Generate a number such that the frequency of each digit is digit times the frequency in given number
- Number of times a number can be replaced by the sum of its digits until it only contains one digit
Improved By : jit_t