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 a number has digits in the given Order
- Check if the sum of digits of a number N divides it
- Check if the given decimal number has 0 and 1 digits only
- Check if the Xor of the frequency of all digits of a number N is zero or not
- 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
- Check if a given number divides the sum of the factorials of its digits
- Program to check if a number is divisible by any of its digits
- Program to check if a number is divisible by sum of its digits
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.