Scanner scn=new Scanner(System.in);
int n=scn.nextInt();
int nst=1;
int nsp=n-1;
int val;
int row=1;
while(row<=n) {
val=row;
for(int csp=1;csp<=nsp;csp++) {
System.out.print("\t");
}
int cst=1;
for( ;cst<=nst;cst++) {
System.out.print(val+"\t");
}
if(cst<=nst/2) {
val++;
}
else {
val--;
}
System.out.println();
nsp--;
nst+=2;
row++;
}
what is wrong in this code