Scanner error in Web IDE

When I run this code :
import java.util.*;
public class Main {
public static void main(String args[]) {
System.out.println(“Enter the number of rows”);
Scanner sc=new Scanner(System.in);
int N=sc.nextInt();

    for(int j = N ; j >= 1 ; j--){
        for(int i = j-1 ; i >0 ; i--) {

            System.out.print(" ");
        }

        for(int k = j; k < j+N;k++){

            if(j==1 || j== N)
            System.out.print("*");
            else{
                if( k == j || k==j+N-1){ 
                System.out.print("*");

                if(k < j+N-1){for(int l = j+1 ; l < j+N-1 ; l++){
                    System.out.print(" ");
                } 
            }

        }
  
    }
    
}
        
System.out.println();

}

}

}

in my IDE it works fine but on the website ,its showing me the following error: Exception in thread “main” java.util.NoSuchElementException
at java.util.Scanner.throwFor(Scanner.java:862)
at java.util.Scanner.next(Scanner.java:1485)
at java.util.Scanner.nextInt(Scanner.java:2117)
at java.util.Scanner.nextInt(Scanner.java:2076)
at Main.main(Main.java:6)

you don’t have to print “Enter the number of rows”. Remove it and it should work just fine.