質問編集履歴
3
test
CHANGED
File without changes
|
test
CHANGED
@@ -9,6 +9,24 @@
|
|
9
9
|
|
10
10
|
|
11
11
|
```
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
#include<stdio.h>
|
16
|
+
|
17
|
+
#include<stdlib.h>
|
18
|
+
|
19
|
+
#define _USE_MATH_DEFINES
|
20
|
+
|
21
|
+
#include<math.h>
|
22
|
+
|
23
|
+
#define MaxN 100
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
FILE *fp1;
|
28
|
+
|
29
|
+
FILE *fp2;
|
12
30
|
|
13
31
|
int main() {
|
14
32
|
|
@@ -31,6 +49,16 @@
|
|
31
49
|
double minx = x[i];
|
32
50
|
|
33
51
|
double miny = y[i];
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
fopen_s(&fp1, "data.csv", "r");
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
fopen_s(&fp2, "task3.csv", "w");
|
60
|
+
|
61
|
+
|
34
62
|
|
35
63
|
|
36
64
|
|
@@ -71,3 +99,19 @@
|
|
71
99
|
|
72
100
|
|
73
101
|
fclose(fp1);
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
fprintf(fp2, "最大値,%lf,%lf\n最小値,%lf,%lf\n", maxx, maxy, minx, miny);
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
fclose(fp2);
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
return 0;
|
114
|
+
|
115
|
+
}
|
116
|
+
|
117
|
+
```
|
2
test
CHANGED
File without changes
|
test
CHANGED
@@ -4,7 +4,33 @@
|
|
4
4
|
|
5
5
|
|
6
6
|
|
7
|
-
|
7
|
+
変数の定義はたぶんちゃんとできてます。
|
8
|
+
|
9
|
+
|
10
|
+
|
11
|
+
```
|
12
|
+
|
13
|
+
int main() {
|
14
|
+
|
15
|
+
double x[MaxN] = { 0.0 };
|
16
|
+
|
17
|
+
double y[MaxN] = { 0.0 };
|
18
|
+
|
19
|
+
int i;
|
20
|
+
|
21
|
+
int N;
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
i = 0;
|
26
|
+
|
27
|
+
double maxx = x[i];
|
28
|
+
|
29
|
+
double maxy = y[i];
|
30
|
+
|
31
|
+
double minx = x[i];
|
32
|
+
|
33
|
+
double miny = y[i];
|
8
34
|
|
9
35
|
|
10
36
|
|
1
test
CHANGED
File without changes
|
test
CHANGED
File without changes
|