What is the wrong in this code. Question Name - Manmohan Loves Patterns -l. why i donot Score full 100

Scanner sc =new Scanner (System.in);

int n =sc.nextInt();

for(int i =1;i<=n;i++){
for(int j =1;j<=i;j++){
if(j==1||i==j){
System.out.print("1 ");
}else{
if(i%2==1){
System.out.print("1 ");
}else{
System.out.print("0 ");
}
}

}
System.out.println();

}

}

}

@Shobhan Hi, no need for spaces, submit it without space, and resolve the doubt and rate full.

import java.util.*;
public class Main {
public static void main(String args[]) {

Scanner sc =new Scanner (System.in);

int n =sc.nextInt();

for(int i =1;i<=n;i++){
for(int j =1;j<=i;j++){
if(j==1||i==j){
System.out.print(“1”);
}else{
if(i%2==1){
System.out.print(“1”);
}else{
System.out.print(“0”);
}
}

}
System.out.println();

}

}

}

Here submit this.