import java.io.Console; class pattern13 { public static void main(String args[]) { for(int i = 1;i<=5;i++) { for(int j = 1;j<=i;j++) System.out.print(j); for(int j = 1;j<=9-2*i;j++) System.out.print(" "); for(int j = i;j>=1;j--) { if(j==5) continue; System.out.print(j); } System.out.println(); } } }
Comments
Post a Comment