Nagarro Interview Question

prime no between 1 to n