Infosys interview question

To write the Prime Number Program