Prime

class recursive_prime
{
public static void main(int n)
{
if(isPrime(n,n-1))
System.out.println(“Prime”);
else System.out.println(“Composite”);
}

public static boolean isPrime(int n,int m)
{
if(m==1)
return true;

else if(n%m==0)
return false;

else return isPrime(n,m-1);
}
}