Wipro interview question

write a program to print the prime numbers using function?