Pls provide me the for loop method of it so that i can compare with mine

for loop code for this pattern

Hey @rishabh.chhabra10
using for loop.
import java.util.Scanner;

public class Main {
public static void main(String[] args) {
Scanner scn = new Scanner(System.in);
int n = scn.nextInt();
int row = 1;
int nst = 1;
for (row = 1; row <= n; row++) {
for (nst = n-row; nst >=0; nst–) {
System.out.print("*");
}
System.out.println();

	}

}

}