Hexaware Technologies interview question

Prime number program