Kaprekar Number in Java

Channel:
Subscribers:
1,540
Published on ● Video Link: https://www.youtube.com/watch?v=bwjvWACY6JU



Duration: 4:46
14 views
0


Kaprekar Number in Java

In this tutorial, I have shown how we can write a Java program to check whether a given number is a Kaprekar number or not.

A positive whole number 'n' that has 'd' number of digits is squared and split into two pieces, a right-hand piece that has 'd' digits and a left-hand piece that has remaining 'd' or 'd - 1' digits. If the sum of the two pieces is equal to the number, then 'n' is a Kaprekar number. The first few Kaprekar numbers are 9, 45, 297 ...

#kaprekar #java #isc #computerscience







Tags:
robin sir
kaprekar number
java
isc
computer science
kaprekar number program in java