is this a good code for there is any other code better then this
package praticesec1;
import java.util.Scanner;
public class Pro24 {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int nsp =n-1;
int nst =1;
int val =1;
for(int row =1 ; row<=n; row++)
{
// work for spaces
for(int csp =1;csp<=nsp;csp++)
{
System.out.print("\t");
}
// for star
for(int cst =1;cst<=nst;cst++)
{
System.out.print(val+"\t");
if(cst<=nst/2)
{
val++;
}else
{
val--;
}
}
// work for spaces
for(int csp =1;csp<=nsp;csp++)
{
System.out.print("\t");
}
// preparation
System.out.println();
nsp–;
nst +=2;
val+=2;
