回答編集履歴
2
コード修正
test
CHANGED
@@ -10,28 +10,4 @@
|
|
10
10
|
|
11
11
|
+ for (j = 0; j <= i - 1; j++)
|
12
12
|
|
13
|
-
{
|
14
|
-
|
15
|
-
- if (word[j] > word[j+1])
|
16
|
-
|
17
|
-
+ if (word[j] > word[i])
|
18
|
-
|
19
|
-
{
|
20
|
-
|
21
|
-
- tmp = word[j+1];
|
22
|
-
|
23
|
-
+ tmp = word[i];
|
24
|
-
|
25
|
-
- word[j+1] = word[j];
|
26
|
-
|
27
|
-
+ word[i] = word[j];
|
28
|
-
|
29
|
-
word[j] = tmp;
|
30
|
-
|
31
|
-
}
|
32
|
-
|
33
|
-
}
|
34
|
-
|
35
|
-
}
|
36
|
-
|
37
13
|
```
|
1
コード修正
test
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
```diff
|
2
2
|
|
3
|
-
- for (i = 9; i > 0; i--)
|
3
|
+
- for (i = 9; i >= 0; i--)
|
4
4
|
|
5
5
|
+ for (i = 8; i > 0; i--)
|
6
6
|
|