Cognizant interview question

Write a code for prime number