+ 2
How to make a code in java so that it find a krishnamurthy number in an array.
3 ответов
+ 5
1. Iterate over the array
2. Split each number into the digits it is build of
3. Calculate the factorial for each digit
4. Sum up and compare
+ 5
Declare a sum variable within the for loop through the array, then join the inner loop over the numbers' digits and add the results of its factorials. Last step in outer loop, after the inner loop, is the comparison between number and sum...
+ 1
Yes Sandra Meyer you are right but i am finding it difficult to to do the 4th step.