A neon number is a number where the sum of digits of square of the number is equal to the number. For example, if the input number is 9, its square is 9*9 = 81 and the sum of the digits is 9. i.e. 9 is a neon.
In this program, you are going to learn that how to check a given number is neon or not.
Steps to check a given number is neon or not
1. Calculate the square of the given number.
2. Add each digit of the calculated square number.
3. compare the sum of digits of square of the number and number.
4. If the sum of digits equal to the number, then it is a neon otherwise it is not neon.
Enter the number =9
You can also write a program to check and print neon numbers in a given range.
0 is neone number
1 is neone number
9 is neone number