1 public class a{ 2 public static void main(String[] args) { 3 4 int i=1; 5 for (i=1;i<=9;i++) 6 { 7 for (int k=1;k<=9-i;k++) 8 { 9 System.out.print(" "); 10 } 11 for (int j=i;j>=1;j--) 12 { 13 System.out.print(j); 14 } 15 for (int j=2;j<=i;j++) 16 { 17 System.out.print(j); 18 } 19 System.out.println(); 20 } 21 } 22 23 }