Q. Java Program to Check If a Number is Neon Number or Not
A neon number is a number where the sum of digits of the square of the number is equal to the number. The task is to check and print neon numbers in a range.
Case 1:
Input : 9 Output : Given number 9 is Neon number
Explanation : square of 9=9*9=81; sum of digit of square : 8+1=9(which is equal to given number)
Case 2:
Input : 8 Output : Given number is not a Neon number
Explanation : square of 8=8*8=64 sum of digit of square : 6+4=10(which is not equal to given number)