File tree 1 file changed +102
-0
lines changed
1 file changed +102
-0
lines changed Original file line number Diff line number Diff line change
1
+ public class exo_2013_logo
2
+ {
3
+ public static void main (String []args )
4
+ {
5
+
6
+ for (int i = 1 ; i <= 13 ; i ++)
7
+ {
8
+ for (int j = 1 ; j <= 18 ; j ++)
9
+ {
10
+ if (i ==1 ||i ==13 )
11
+ {
12
+ if (j ==3 || j ==4 || j ==12 )
13
+ {
14
+ System .out .print ("x" );
15
+ }
16
+ else
17
+ {
18
+ System .out .print (" " );
19
+ }
20
+ }
21
+ else if (i ==2 || i ==12 )
22
+ {
23
+ if (j ==3 || j ==5 || j ==11 || j ==13 )
24
+ {
25
+ System .out .print ("o" );
26
+ }
27
+ else
28
+ {
29
+ System .out .print (" " );
30
+ }
31
+ }
32
+ else if (i ==3 || i ==11 )
33
+ {
34
+ if (j ==4 || j ==6 || j ==10 || j ==12 || j ==14 )
35
+ {
36
+ System .out .print ("x" );
37
+ }
38
+ else
39
+ {
40
+ System .out .print (" " );
41
+ }
42
+ }
43
+ else if (i ==4 || i ==10 )
44
+ {
45
+ if (j ==5 || j ==7 || j ==9 || j ==11 || j ==13 || j ==15 )
46
+ {
47
+ System .out .print ("o" );
48
+ }
49
+ else
50
+ {
51
+ System .out .print (" " );
52
+ }
53
+ }
54
+ else if (i ==5 || i ==9 )
55
+ {
56
+ if (j ==6 || j ==8 || j ==10 || j ==14 || j ==16 )
57
+ {
58
+ System .out .print ("x" );
59
+ }
60
+ else
61
+ {
62
+ System .out .print (" " );
63
+ }
64
+ }
65
+ else if (i ==6 || i ==8 )
66
+ {
67
+ if (j ==2 || j ==3 || j ==4 || j ==5 ||j ==6 || j ==9 || j ==15 || j ==17 )
68
+ {
69
+ System .out .print ("o" );
70
+ }
71
+ else
72
+ {
73
+ System .out .print (" " );
74
+ }
75
+ }
76
+ else if (i ==7 )
77
+ {
78
+ if (j ==1 || j ==9 || j ==15 || j ==18 )
79
+ {
80
+ System .out .print ("x" );
81
+ }
82
+ else
83
+ {
84
+ System .out .print (" " );
85
+ }
86
+ }
87
+ else
88
+ {
89
+ System .out .print (" " );
90
+ }
91
+ }
92
+ System .out .println ();
93
+ }
94
+
95
+ }
96
+ }
97
+
98
+
99
+
100
+
101
+
102
+
You can’t perform that action at this time.
0 commit comments