the expected output is
*_*_*_*_*
*_*_*_*_*
*_*_*_*_*
*_*_*_*_*
*_*_*_*_*
but my code is kindof wrong
public class RowColumnStarUnderscore {
public static void main(String[] args) {
int TOTAL_ROWS = 5;
int TOTAL_COLUMNS = 5;
for(int row=1;row<=TOTAL_ROWS;row++) {
for(int col=1; col <=TOTAL_COLUMNS; col++) {
System.out.print("*_");
}
System.out.println();
}
}
}
my output is something like this :/
*_*_*_*_*_
*_*_*_*_*_
*_*_*_*_*_
*_*_*_*_*_
*_*_*_*_*_
please help me to fix this..thank you!