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:  

This is output
Capture.JPG

thats a good ,learning post

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

Coin Marketplace

STEEM 0.17
TRX 0.15
JST 0.029
BTC 60938.00
ETH 2386.38
USDT 1.00
SBD 2.57