Print Second Star



public class Arr {

public static void main(String[] args) {

int row = 6;

int col = 6;

for (int i = 0; i < row; i++) {

for (int j = 0; j < i; j++) {

System.out.print("*");

}

System.out.println();

}

}

OUTPUT IS:-
*
**
***
****
*****

No comments: