diff --git a/neon.class b/neon.class new file mode 100644 index 0000000..012f570 Binary files /dev/null and b/neon.class differ diff --git a/neon.java b/neon.java new file mode 100644 index 0000000..97858f9 --- /dev/null +++ b/neon.java @@ -0,0 +1,19 @@ +import java.io.*; +class neon{ + public static void main(String args[])throws IOException{ + BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); + System.out.print("N = "); + int n = Math.abs(Integer.parseInt(br.readLine())); + int s = n * n; + int sum = 0; + while(s != 0){ + int d = s % 10; + sum += d; + s /= 10; + } + if(n == sum) + System.out.println(n + " is not a Neon Number."); + else + System.out.println(n + " is a Neon Number."); + } +} \ No newline at end of file