C++ program that prints prime numbers up to 5000