Fast Enterprises Interview Question

Had to write code to find a prime number