From 1f425aba3e8fa2f6129382486e3215b9466588f4 Mon Sep 17 00:00:00 2001 From: sonal251001 <73117995+sonal251001@users.noreply.github.com> Date: Tue, 25 May 2021 13:20:34 +0530 Subject: [PATCH] Add Neon Number --- neon.class | Bin 0 -> 1012 bytes neon.java | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 neon.class create mode 100644 neon.java diff --git a/neon.class b/neon.class new file mode 100644 index 0000000000000000000000000000000000000000..012f5708d83f3ad215d6e423c64192a3667f8a64 GIT binary patch literal 1012 zcmZ`%T~8B16g|^!nRZ!9DYSgp>Z+(+Kt1Ut$R7tSU#8Asv7mH~+M=xhXtRUln#;cpN&z=xMGjTOGgRd%|vZ z(=iz6e3gj zs!}jwU=(9y#_f=|GqP8nBTwWOqsTB!ElOW_rftejbAtlkHEY|Vwre_@rsJDV+mynU zrt6u~^>tjv6%NzDRa_(TQw!&AW#BEv(NG>w#07n(9yxN0xd!7vI-J%XeJa=9oLz&+^Kj452D+$E%6wj^d6fZPTg^^b79NP^%{drpB7q`}CEi zozWhdI0XAl0mBTfDh-5bz#gDLB?|gICo%~0NKd{ zT>pYw^O?+cA(D!GL^_kuTLmqf(%zORY|QT+|IDT$pAc6ix2a?gy(-L8s04%p0R{9? z96^$#4ABf^5XCsjv7lp`Ms|ksvxwsfAzlz-6=QfqZXQxq8rm@ddpI6(a26OGPH;S? NoJPiq^v(xNrQcp<<{tn6 literal 0 HcmV?d00001 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