Aptean interview question

Prime number program