package pattern;
import java.util.Scanner;
public class pattern13 {
public static void main(String[] args) {
Scanner scn =new Scanner(System.in);
int n =scn.nextInt();
int nst=1;
int nr = 2*n-1;
int row=1;
while (row<=n) {
int cst=1;
while (cst<=nst) {
System.out.print("*");
cst++;
}
System.out.println();
if (row<= nr / 2) {
nst++;
}
else {
nst--;
}
row++;
}
}
}
what is wrong in this pattern