+ 2
What is spy number & neon number anyone know then please explain me
5 Réponses
+ 1
only the 9 is the neon number ah there is any other number
+ 1
There are only 2 neon numbers i.e. 1 and 9. Java program is
import java.util.*;
public class NeonNumber
{
public static void main(String args[])
{
Scanner ob=new Scanner(System.in);
System.out.println("Enter the number to be checked.");
int num=ob.nextInt();
int square=num*num;
int sum=0;
while(square!=0)//Loop to find the sum of digits.
{
int a=square%10;
sum=sum+a;
square=square/10;
}
if(sum==num)
{
System.out.println(num+" is a Neon Number.");
}
else
{
System.out.println(num+" is not a Neon Number.");
}
}
}
0
I understand the spy number but I had not understand the neon number. Can you send me the java program of neon number to knows better.
0
Superb