DevX interview question

Write code for Primary numbers