Given two integers A and B, the task is to check whether both the numbers have equal number of digits.
Input: A = 12, B = 1
Input: A = 20, B = 99
Approach: While both the numbers are > 0, keep dividing both the numbers by 10. Finally, check if both the numbers are 0. If any one of them is not 0 then they had unequal number of digits.
Below is the implementation of the above approach:
- Check whether product of digits at even places is divisible by sum of digits at odd place of a number
- Count of numbers between range having only non-zero digits whose sum of digits is N and number is divisible by M
- Check if the Xor of the frequency of all digits of a number N is zero or not
- Check if the sum of digits of a number N divides it
- Check if a number has digits in the given Order
- Check if the given decimal number has 0 and 1 digits only
- Check if the frequency of all the digits in a number is same
- Check if all digits of a number divide it
- Number of digits in the product of two numbers
- Check if a number with even number of digits is palindrome or not
- Program to check if a number is divisible by sum of its digits
- Check if a number is magic (Recursive sum of digits is 1)
- Program to check if a given number is Lucky (all digits are different)
- Check if a given number divides the sum of the factorials of its digits
- Check if a given number can be represented in given a no. of digits in any base
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.