Home > Back-end >  A little didn't understand in Java FOR the inner loop
A little didn't understand in Java FOR the inner loop

Time:10-31

Package asd.

import java.util.Scanner;

Public class test01 {

Public static void main (String [] args) {
Scanner kk=new Scanner (System. In);
System. The out. Println (" please input the number of rows of the triangle: ");
Int rows=kk. NextInt ();
Long p;
for(int i=1; i<=rows; I++) {//start here don't understand is how to run the
for(int j=1; j<=I; J++) {
System.out.print("*");
}
System.out.println();
}
}

}

CodePudding user response:

Ask bosses solve for inner loop is how run

CodePudding user response:

Every line of output increasing * according to the number of rows, similar to the multiplication table,
  • Related