Why My ganesha Pattern TEst Case is failed

import java.util.Scanner;

public class Main {

public static void main(String[] args) {
    


    int num;

    Scanner sc=new Scanner(System.in);
    System.out.println("Enter number of rows");

    num=sc.nextInt();
    int mid=(num/2)+1;

    for(int i=1; i<=num;i++)
    {

        for(int j=1;j<=num;j++)

        {
            if(i==mid || j==mid ||(i==1 && j >mid) || (i==num && j<mid) || (j==1 && i<mid) || (j==num && i>mid))

{
System.out.print("*");
}
else
{
System.out.print(" ");

}

        }

        System.out.println();

    }

}

}

@sandeepmaddeshiya78_2feec877c506dc09 Don’t add unnecessary SysO statements. Remove line :
System.out.println(“Enter number of rows”);
bcoz your output should not contain anything except for the format given.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.