Fast Enterprises Interview Question

Prime numbers coding question