XYZ Interview Question

The Code on Prime Number