0
How to draw
X 1 1 1 0 1 X 1 0 A 1 1 X A A 1 0 A X A 0 A A A X
3 Respostas
+ 4
You can use a 2d array.
0
why
0
for (int i=0;i <=4;i++){
for (int j=0;j <=4;j++)
if (i==j)System.out.print("X ");
else if (i+j==4)System.out.print("0 ");
else if (i+j<=4-1)System.out.print("1 ");
else System.out.print("A ");
System.out.println ();}