u have modified my code but still error is there
my code is
Output :
System.out.print(" ");
}
for(int cst=1;cst<=nst;cst++) {
System.out.print("*");
}
for(int i =1;i<=n/2+1;i++) {
if(row==1||row==n) {
System.out.print("*");
}
else {
System.out.print(" ");
}
}
for(int cst=1;cst<=nst;cst++) {
System.out.print("*");
}
System.out.println();
nsp= nsp-1;
row = row +1;
}