Pattern number star 1

public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int nsv = n;
int nst = 0;
int val;

	int row = 1;
	while (row <= n) {
		val = 1;
		for (int csv = 1; csv <= nsv; csv++) {
			System.out.print(val + "\t");
			val++;
		}
		for (int cst = 1; cst <= nst; cst++) {
			System.out.print("*" + "\t");
		}

		System.out.println();

// if(row==2) {
// nst=(nst+1);
// }
// else {
nst = nst + 2;
// }
//
nsv–;
row++;
}

}

I am getting extra star in every line?? Why

@amangaur078,
Initialize nst from -1 instead of 0. Because when you add 2 to 0, it comes 2. Hence 2 stars. Initialize it from -1, because number of stars increase in the order: 1,3,5 and so on

@amangaur078,
https://ide.codingblocks.com/s/259532 code for reference