Scanner s = new Scanner(System.in);
int n = s.nextInt();
int row = 1;
while (row <= n) {
int nst = 1;
while (nst <= row) {
System.out.print("*");
nst++;
}
System.out.println();
row++;
}
same pattern is printed but not using cst variable…