The 3n + 1 problem form UVa Online Judge (100) implemented in C++