回答編集履歴
1
追記
test
CHANGED
@@ -103,3 +103,39 @@
|
|
103
103
|
|
104
104
|
|
105
105
|
```
|
106
|
+
|
107
|
+
**追記**
|
108
|
+
|
109
|
+
結果の表示を変えたい場合は、
|
110
|
+
|
111
|
+
```C
|
112
|
+
|
113
|
+
if (i == 10) {
|
114
|
+
|
115
|
+
static char c[] ="abc.def.gh";
|
116
|
+
|
117
|
+
for (k = 1, i = 0; i < 10; i++)
|
118
|
+
|
119
|
+
if (a[i] == k) printf(" (%c,%c)", c[i], c[i+(a[i+1]==k++ ? 1 : 4)]);
|
120
|
+
|
121
|
+
putchar('\n');
|
122
|
+
|
123
|
+
}
|
124
|
+
|
125
|
+
```
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
実行結果
|
130
|
+
|
131
|
+
```text
|
132
|
+
|
133
|
+
(a,b) (c,f) (d,e) (g,h)
|
134
|
+
|
135
|
+
(a,b) (c,f) (d,g) (e,h)
|
136
|
+
|
137
|
+
(a,d) (b,c) (e,f) (g,h)
|
138
|
+
|
139
|
+
(a,d) (b,e) (c,f) (g,h)
|
140
|
+
|
141
|
+
```
|