回答編集履歴
2
returnを忘れてた…exitもreturnにした
test
CHANGED
@@ -76,7 +76,7 @@
|
|
76
76
|
|
77
77
|
fprintf(stderr, "stdin is end of file.");
|
78
78
|
|
79
|
-
e
|
79
|
+
return 1;
|
80
80
|
|
81
81
|
}
|
82
82
|
|
@@ -100,6 +100,8 @@
|
|
100
100
|
|
101
101
|
}
|
102
102
|
|
103
|
+
return 0;
|
104
|
+
|
103
105
|
}
|
104
106
|
|
105
107
|
```
|
1
inlien staticにする。
test
CHANGED
@@ -18,7 +18,7 @@
|
|
18
18
|
|
19
19
|
// nan 未対応
|
20
20
|
|
21
|
-
int double_compare(const void *a, const void *b)
|
21
|
+
inline static int double_compare(const void *a, const void *b)
|
22
22
|
|
23
23
|
{
|
24
24
|
|
@@ -36,7 +36,7 @@
|
|
36
36
|
|
37
37
|
{
|
38
38
|
|
39
|
-
double arr[N + 1] = {0}; // 全部 0 で初期化
|
39
|
+
double arr[N + 1] = {0}; // 全部 0 で初期化 N + 1 個にすること。
|
40
40
|
|
41
41
|
arr[N] = NAN; // 終端を nan にする。
|
42
42
|
|