Create factor.cpp

Factorize a number n