Number Factorizer in C++