質問編集履歴
3
test
CHANGED
File without changes
|
test
CHANGED
@@ -54,7 +54,7 @@
|
|
54
54
|
|
55
55
|
}
|
56
56
|
|
57
|
-
for(i=0;
|
57
|
+
for(i=0;i<1000;i++){
|
58
58
|
|
59
59
|
x=i/100.0;
|
60
60
|
|
2
test
CHANGED
File without changes
|
test
CHANGED
@@ -42,6 +42,8 @@
|
|
42
42
|
|
43
43
|
FILE *wfp;
|
44
44
|
|
45
|
+
//ファイルオープン
|
46
|
+
|
45
47
|
wfp=fopen(“data.dat”,”w”);
|
46
48
|
|
47
49
|
if(wfp==0){
|
1
test
CHANGED
File without changes
|
test
CHANGED
@@ -36,13 +36,25 @@
|
|
36
36
|
|
37
37
|
float Pi=3.1415;
|
38
38
|
|
39
|
-
float y;
|
39
|
+
float y,x;
|
40
|
+
|
41
|
+
int i;
|
40
42
|
|
41
43
|
FILE *wfp;
|
42
44
|
|
43
|
-
|
45
|
+
wfp=fopen(“data.dat”,”w”);
|
44
46
|
|
47
|
+
if(wfp==0){
|
48
|
+
|
49
|
+
printf(“open error”);
|
50
|
+
|
51
|
+
exit(-1);
|
52
|
+
|
53
|
+
}
|
54
|
+
|
45
|
-
for(
|
55
|
+
for(i=0;x<1000;i++){
|
56
|
+
|
57
|
+
x=i/100.0;
|
46
58
|
|
47
59
|
y=sin(2*Pi*x);
|
48
60
|
|
@@ -51,6 +63,8 @@
|
|
51
63
|
}
|
52
64
|
|
53
65
|
//ここに何かが必要?
|
66
|
+
|
67
|
+
fclose(wfp);
|
54
68
|
|
55
69
|
|
56
70
|
|