Example program to test the primality of a given number in Scala