Tag: charAt
-
How to check whether a number is Armstrong number or not
This is the first solution to check the number for Armstrong. This solution uses String class, and a couple of Character functions to evaluate the sum of the cubes of each digit in a given number. The Armstrong number is say for a given number 153, evaluate the powers of cubes from any side as…
-
How to find subsets of a given string
This is the second solution to list all the subsets or substrings of a given string. This program does not use the substring method, instead uses the StringBuilder class append method.
-
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)…
