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 if the number formed by the last digits of N numbers is divisible by 10 or not
- 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 sum of digits of number is divisible by all of its digits
- Check if the frequency of all the digits in a number is same
- Check if all digits of a number divide it
- Check if the given decimal number has 0 and 1 digits only
- Check if a number has digits in the given Order
- Check if the sum of digits of a number N divides it
- Check if the Xor of the frequency of all digits of a number N is zero or not
- Number of digits in the product of two numbers
- Check if a number with even number of digits is palindrome or not
- Check whether sum of digits at odd places of a number is divisible by K
- Program to check if a number is divisible by any of its digits
- Check if the number is even or odd whose digits and base (radix) is given
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 Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.