package Section1pattern;
import java.util.Scanner;
public class Pattern27 {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner scn = new Scanner(System.in);
System.out.println(“Enter the number of rows”);
int n = scn.nextInt();
int q = n-1;
int counter = 1;
for(int i = 1 ; i<=n;i++) {
int t = 1;
while(t<=2) {
for(int j =1;j<=q;j++) {
System.out.print("\t");
}
if(t!=2) {
int y=1;
for(int r=1;r<=counter;r++) {
System.out.print(y);
System.out.print("\t");
y++;
}
counter=counter+1;
}
t++;
}
System.out.println("\n");
q=q-1;
}
}
}
I am not getting how to decrease the value in every single row. i cant understand how to make that loop.