Skip to content

Latest commit

 

History

History
7 lines (5 loc) · 586 Bytes

README.md

File metadata and controls

7 lines (5 loc) · 586 Bytes

kaprekar

A simple program to determine which four-digit integers reach Kaprekar's constant in a single step, i.e., if a four-digit number reordered ascending is subtracted from the same number reorded descending, the result is Kaprekar's constant, 6174.

I was inspired to write this code when I saw a short video. See https://en.wikipedia.org/wiki/6174 for more information.

NOTE: I am a hobbyist and my coding skills are weak so maybe view this repo as an example of what not to do.