the program finds and prints the nth prime number to the console.