What is the output of this program?

in #java7 years ago

class Triangle{

public static void main(String[] args){

    int i,j,k;
    for( i=1; i<=5; i++ ) {
        for( j=4; j>=i; j-- ) {
            System.out.print( " " );
         }
        for ( k=1; k<=(2*i-1); k++) {
             System.out.print(k);
        }
        System.out.println("");
    }
}

}
Capture.PNG

Sort:  

good job..

This is output
Capture.JPG

keep it up

thats a good ,learning post

if you want write here about java in English as your blog