Problem: Write a C program to check whether the number is Neon or not.

A number is said to be a Neon Number if the sum of digits of its square is equal to the original number.

Example: 9

Neon Number Test

Steps to check Neon number in C

  1. Input a number.
  2. Calculate the square of the number.
  3. Sum digits of the square.
  4. Check if sum of digits of the square is equal to the original number.
  5. If yes then the number is Neon, else it is not.

Here is the implementation of the steps in C.


Check Whether a number is neon or not
Neon Number Program Output

In this tutorial, we learned to check Neon Number in C programming language.

Leave a Reply