VOOZH about

URL: https://www.geeksforgeeks.org/dsa/neon-number/

⇱ Neon Number - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Neon Number

Last Updated : 19 Jul, 2025

A neon number is a number where the sum of digits of square of the number is equal to the number. The task is to check and print neon numbers in a range.

Examples: 

Input : 9
Output : Neon Number
Explanation: square is 9*9 = 81 and
sum of the digits of the square is 9.
Input :12
Output : Not a Neon Number
Explanation: square is 12*12 = 144 and
sum of the digits of the square is 9 (1
+ 4 + 4) which is not equal to 12.

The implementation is simple, we first compute square of given number, the find sum of digits in the square.

Output:  

1 9




Comment
Article Tags: