Skip to content

Get cycles and cycle count until a Kaprekar constant is reached for numbers with 3 and 4 digits

Notifications You must be signed in to change notification settings

FirasSharp/KaprekarCount

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KaprekarCount

What is this?

I have no idea, i am very confused and can not think properly as of next week i have the first 4 exams that will determine my future and i still did not study, now its 5:42 AM and i still did not sleep because of my anxiety so i ended up doing nothing the whole day except Djing and programming.

Why Kaprekar?

I was laying in bad and scrolling through reddit on the sub r/TikTokCringe and stumbled on this video, while watching it i was thinking on what i can do with what i just learned if i programmed it (professional deformation).

Techno & Coding

So i also uploaded my live set from today on SoundCloud if you want to listen to it.

How to use this class?

Do you really have to? If yes then quick example:

const KaprekarCount = require('../index');
const Kaprekar = new KaprekarCount();
const cycle = Kaprekar.cycle(2342);
const count = Kaprekar.cycleCount(2342);
console.log(cycle); // will log the array with the numbers of the cycle
console.log(count); // literally the length of the array lol

About

Get cycles and cycle count until a Kaprekar constant is reached for numbers with 3 and 4 digits

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published