Cognizant Interview Question

Write a code for the detection of prime numbers?