Check prime

Easy
0/10

Problem statement

What will be the output of the following code:

 public static boolean isPrime(int x)
{
    for(int i=2;i<x/2;i++)
    {
        if(x%i==0)
        return false;
    }
    return true;

}
public static void main (String[] args) {
    System.out.print(isPrime(47));
}
Check prime
Options: Pick one correct answer from below