Fast Enterprises Interview Question

Pseudocode for how to derive a prime number