Happy Pi day!!!

simplified and solved

The number 6174 is called the Kaprekar constant. It was discovered by the Indian Mathematician Kaprekar.
We get this constant if we perform certain routine calculations to any four-digit number.
The rule is
1. Take any 4 digit number.
2. Arrange the digits of the 4 digit number in descending and ascending order.
3. Subtract the smaller number from the bigger number
4. Repeat the steps from 2 for the answer obtained also.
Repeat the steps till you reach 6174.
We always end up with 6174. Once you reach 6174, the process will continue generating the same number.
Let us solve an example to understand this..

A Kaprekar number is
A number’s square divided into two parts such that the sum of its parts is equal to the original number.
An example of this Kaprekar Number is explained in the following video.