Santoshi interview question

Write code for Prime Number