Cognizant interview question

prime number program