Magic Numbers in Java
The number whose sum if calculated to single digit turns out to be 1 then the number is called Magic number. Example 1 :- 1234 1+2+3+4 = 10 1+0 = 1 Since we got the sum to be 1 hence 1234 is a Magic number. Example 2 :- 7111 7+1+1+1 = 10 1+0 = 1 … Read more