Skip to content

Instantly share code, notes, and snippets.

View plasmarad's full-sized avatar
📑
Aspiring Software Engineer.

plasmarad

📑
Aspiring Software Engineer.
View GitHub Profile
@plasmarad
plasmarad / CollatzConjecture.cpp
Last active February 2, 2024 03:11
Collatz conjecture is an arithmetic problem in which there are 2 rules, If a inputted number is even: divide by 2. if the inputted number is odd: multiply by 3 and add 1, whats interesting about this conjecture is that it will always result in a loop resulting in 1
/*
plasmarad - 2024
CollatzConjecture:
if a number is even: divide by 2
if a number is odd : Mult 3 add 1
Eventually, with all numbers, it will loop into 1 [ex: 1 -> 4 -> 2 -> 1]
*/
#include <stdint.h>