Even though the program works fine the test cases are not passed

import java.util.*;
public class Main {
public static void main(String args[]) {
int n=0;
int rows=1;
int nsp=0;
if(n>=1 &&n<100){
while(rows<=n){
System.out.print(rows);
System.out.print("\t");
int csp=1;
while(csp<nsp){
System.out.print(0);
System.out.print("\t");
csp++;
}
if(rows>1)
System.out.print(rows);
System.out.println();
rows++;
nsp++;
}
}
else
System.out.print(“enter a valid positive integer”);

}
}

you forgot to take input n.n isn’t constant.
corrected code: