Computer Science, asked by aditi8044, 1 year ago

java program........

Attachments:

Answers

Answered by Anonymous
2

ANSWER IN THE ABOVE ATTACHMENT

Attachments:
Answered by BrainlyPromoter
3

import java.io.*;

public class NeonNumber{

   public static void main() throws IOException{

       InputStreamReader ob=new InputStreamReader(System.in);

       BufferedReader obj=new BufferedReader(ob);

       System.out.println("Enter  a number to be checked.");

       String n=obj.readLine();

       int num=Integer.parseInt(n);

       int sq=num*num;

       int rem,sum;

       sum=0;

       while(sq>0)

       {

           rem=sq%10;

           sum=sum+rem;

           sq=sq/10;

       }

       if(num==sum)    System.out.println("A Neon Number");

       else    System.out.println("Not A Neon Number");

   }

}

Please refer to the attachment, in case the typed format program is not well indented.

Attachments:
Similar questions