Chevron Interview Question

How would you create a program to detect if a number is prime?