Hexaware Technologies interview question

Write a program for prime number