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

22nd Feb 2017, 3:49 AM
Ali Zeawo
Ali Zeawo - avatar
3 Respostas
+ 4
You can use a 2d array.
22nd Feb 2017, 5:41 AM
Tashi N
Tashi N - avatar
0
why
23rd Feb 2017, 4:00 AM
Ali Zeawo
Ali Zeawo - avatar
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 ();}
23rd Feb 2017, 4:28 AM
Ali Zeawo
Ali Zeawo - avatar