Share your repls and programming experiences

← Back to all posts
Collatz Conjecture
CodeLongAndPros (25)

The Collatz Conjecture says:
For any number:

  • If it is even, then divide it by two.
  • If it is odd, multiply by three and add one.
    Repeat this enough, and you will get one.

This is a Java program that does just that.