Infosys interview question

Write a code for checking prime numbers?