Patter question number 12 sir please tell me why I am getting wrong pattern

import java.util.Scanner;

public class Main {

public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int nsp = n - 1;
int nst = 1;
// row
int row = 1;
while (row <= n) {

	// work space 
	int csp = 1;
	while (csp <= nsp) {
		System.out.print(" ");
		csp++;
	}
		
		//work stars
		int cst = 1;
		while(cst <= nst) {
			System.out.print("*");
			
			cst++;
			System.out.print("!");
		}
			
		// prep
		System.out.println();
		nsp = nsp - 1;
		nst = nst + 1;
		row = row + 1;
		
	}		

}
}

Hi @abhisheksinghchauhan442,
Send me the pattern please i cannot see the pattern.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.