C++ C++ Algorithm Prime Number