Skip to main content

Posts

Showing posts with the label kaprekar number

KAPREKAR NUMBER

PROGRAM : KAPREKAR NUMBER A  Kaprekar number    is a  non-negative   integer , the representation of whose square  can be split into two parts that add up to the original number again. For instance, 45 is a Kaprekar number, because 45 2  = 2025 and 20+25 = 45. And if second splitted part have only 0s then it is not kaprekar number for example 100*100=10000 splitted part is 10+000 thus second part have 0s only Some Examples are: 999 999*999=998001=>998+001=999 1, 9, 45, 55, 99, 297, 703, 999, 2223, 2728, 4879, 4950, 5050, 5292, 7272, 7777, 9999, 17344, 22222, 38962, 77778, 82656, 95121, 99999,  142857 , 148149, 181819, 187110  are some examples of Kaprekar Number SYNTAX import java.io.*; class kaprekar {     public static void main(String args[])throws IOException     {         BufferedReader br=new BufferedReader(new InputStreamReader(System.in));         int n;i...