Monday, 10 November 2014

Blue j pattern program 2

Blue j pattern - 2

Pattern :-
54321
5432
543
54
5
PROGRAM BELOW

public class pattern2 {
    public static void main( String arg[]){
            for(int i=1;i<=5;i++){
            for(int j=5;j>=i;j--){
                System.out.print(j);
            }
            System.out.println();
        }
    }
}

No comments:

Post a Comment