Home > Back-end >  Need not how array output of Yang hui triangle
Need not how array output of Yang hui triangle

Time:09-25

Not how the array output of Yang hui triangle, online such as urgent

CodePudding user response:

Public static void main (String [] args) {
Int rows=10;
for (int i=0; i Int number=1;
//print space
System. The out. The format (" % "+ (rows - I) * 2 +" s ", "");
for (int j=0; J & lt;=I; J++) {
System. The out. The format (" % 4 d, "number);
Number=number * (I - j)/(j + 1);
}
System.out.println();
}

}
  • Related