I'm getting compile error on Scanner line

i’ve to show u smthing . i’m getting error while doing programming
how can i show u . I mean image option is not available.
import java.util.Scanner;

public class Hello {

public static void main(String[] args) {
	
	Scanner scn=new Scanner(System.in);
	int n=scn.nextInt();
	int nsp=n-n;
	int nst=n;
	int row=1;
	while(row<=n) {
		int csp=1;
		while(csp<=nsp){
			System.out.print(" ");
			csp++;
		}
		int cst=1;
		while(cst<=nst) {
			System.out.println("*");
			cst++;
		}
		System.out.print("\n");
		row=row+1;
		nsp=nsp+1;
		nst=nst-1;
	}
}

}

is it right

@Harsh_Sonwani,
What error are you facing? Your code should work. Just take a screenshot and past the image here using ctrl+v.

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.