Home > Back-end >  Output the following graphics in Java
Output the following graphics in Java

Time:10-13

As far as possible in the Java readability higher thanks

CodePudding user response:

Public static void main (String [] args)
{
For (int I=1; I & lt;=17; I++) {
String STR="";
for(int j=1; J & lt;=17; J++) {
If (j & gt; - Math. Abs (I - 9) + 9 & amp; & J & lt;=17 - (- Math. Abs (I - 9) + 9) + 1) {
STR +=- Math. Abs (I - 9) + 9;
} else {
STR +=- Math. Abs (j - 9) + 9;
}
}
System. The out. Println (STR);
}
}
  • Related