Citi Interview Question

How can you write a function that will print out only prime numbers?