回答編集履歴

1

fprintf の "%.1lf" を "%.1f" に修正

2020/11/05 15:52

投稿

kazuma-s
kazuma-s

スコア8224

test CHANGED
@@ -54,8 +54,6 @@
54
54
 
55
55
  {
56
56
 
57
-
58
-
59
57
  for (int i = 0; i < n - 1; i++) {
60
58
 
61
59
  for (int j = i + 1; j < n; j++) {
@@ -100,7 +98,7 @@
100
98
 
101
99
  for (int i = 0; i < n; i++)
102
100
 
103
- fprintf(fp, "%d %-8s %.1lf %.1lf %.1lf \n",
101
+ fprintf(fp, "%d %-8s %.1f %.1f %.1f \n",
104
102
 
105
103
  ID[i], name[i], height[i], weight[i], BMI[i]);
106
104