Please tell my mistake in the logic of my programme


my code for given pattern is please tell my mistake
Scanner scn = new Scanner(System.in);
int n=scn.nextInt();
int nst=1;
int nsp=n-1;
int nr=2n-1;
// row
int row=1;
while(row<=nr) {
for(int csp=1;csp<=nsp;csp++) {
System.out.print(" “);
}
for(int cst=1;cst<=nst;cst++) {
System.out.print(”
");
}
// preparation
System.out.println();
if(row<=nr/2) {
nsp=nsp-1;
nst=nst++;
}
else {
nsp=nsp+1;
nst=nst-1;
}
row=row+1;
}
}

}

Hi Shivendra,
In if block you have written wrong statement for increasing nst. Either write nst++ or write nst = nst + 1.
I have made this change in your code you can see them on the below link :
https://ide.codingblocks.com/s/69598