All pastes #1827701 Raw Edit

Stuff

public text v1 · immutable
#1827701 ·published 2010-03-07 21:57 UTC
rendered paste body
#include <iostream>

int main()
{
    for (int i = 2; i < 5000000; i++)
    {
        int num = i;

        std::cout << num;

        while (num > 1)
        {
            if (!(num % 2))
                num = num / 2;
            else
                num = (num * 3) + 1;

            std::cout << " -> " << num;
        }

        std::cout << std::endl;
    }

    return 0;
}