rdsov / collatz-conjecture

This is a tiny program that simulates the collatz conjecture. Enter any integer greater than 1 and let the simulation run.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

collatz-conjecture

This is a tiny program that simulates the collatz conjecture. Enter any integer greater than 1 and let the simulation run.


What is the collatz conjecture?

  1. Start with any integer n > 0.
  2. If even, divite n by two.
  3. If odd, multiply n by three and then add one.
  4. Repeat this process.

The interesting thing is that n will always end in the 4, 2, 1 cycle.

About

This is a tiny program that simulates the collatz conjecture. Enter any integer greater than 1 and let the simulation run.

License:MIT License


Languages

Language:C++ 91.2%Language:CMake 8.8%