Tag: Math
-
How to check whether a number is Disarium or not
This is the first solution to check the number for Disarium. This solution uses String class, and a couple of Character functions to evaluate the sum of powers. The Disarium number is say for a given number 351, evaluate the powers from the left side as power (3 * 1) + power (5 * 2)…
-
How to check whether a given integer is prime number or not
This is the first solution to find whether the given integer number is prime or not using the core logic, that is to check the divisibility of that number until the square root of that number.
