Updated prime.cpp and prime_factor.cpp