質問編集履歴
1
endをtime\(NULL\)に変更、best=plst\[0\]->best;の追加、go\(\)のreturn\(0\)をreturn\(jikan\)
title
CHANGED
File without changes
|
body
CHANGED
@@ -149,7 +149,8 @@
|
|
149
149
|
plst[i]->tm_hour,plst[i]->tm_min,plst[i]->tm_sec );
|
150
150
|
printf("得点(所要時間)は %.1f秒です。\n\n", plst[i]->best);
|
151
151
|
}
|
152
|
-
|
152
|
+
best=plst[0]->best;
|
153
|
+
|
153
154
|
fflush(stdin);
|
154
155
|
fclose(fp);
|
155
156
|
printf("count2は%d\n\n", *count);
|
@@ -235,9 +236,9 @@
|
|
235
236
|
}
|
236
237
|
} while (no != dgt[x] + '0');
|
237
238
|
}
|
238
|
-
end =
|
239
|
+
end = time(NULL);
|
239
240
|
|
240
|
-
jikan = (double)(end
|
241
|
+
jikan = (double)difftime(end, start)
|
241
242
|
|
242
243
|
printf("%.1f秒かかりました。\n", jikan);
|
243
244
|
|
@@ -252,7 +253,7 @@
|
|
252
253
|
|
253
254
|
term_getputch();
|
254
255
|
|
255
|
-
return (
|
256
|
+
return (jikan);
|
256
257
|
|
257
258
|
}
|
258
259
|
int main(void)
|
@@ -269,7 +270,7 @@
|
|
269
270
|
int i, j, x, stage;
|
270
271
|
best= get_data(&count); // get_data()で前回までの最短所要時間を
|
271
272
|
// ファイルから読み込んでbestに代入する。
|
272
|
-
printf("bestは%
|
273
|
+
printf("bestは%.1f1\n\n", best);
|
273
274
|
printf("count3は%d\n\n", count);
|
274
275
|
|
275
276
|
fp = fopen(dtfile, "rb");
|
@@ -343,8 +344,8 @@
|
|
343
344
|
2016年 1月 4日 19時 15分 11秒 0秒
|
344
345
|
得点(所要時間)は 8.0秒です。
|
345
346
|
|
346
|
-
2016年 3月 19日 11時 43分 16秒 0秒
|
347
|
+
2016年 3月 19日 11時 43分 16秒 0秒
|
347
|
-
得点(所要時間)は 7.8秒です。
|
348
|
+
得点(所要時間)は 7.8秒です。
|
348
349
|
|
349
350
|
2016年 1月 4日 19時 16分 8秒 0秒
|
350
351
|
得点(所要時間)は 9.0秒です。
|
@@ -358,8 +359,8 @@
|
|
358
359
|
2016年 1月 5日 21時 33分 29秒 0秒
|
359
360
|
得点(所要時間)は 10.0秒です。
|
360
361
|
|
361
|
-
2016年 3月 19日 11時 41分 52秒 0秒
|
362
|
+
2016年 3月 19日 11時 41分 52秒 0秒
|
362
|
-
得点(所要時間)は 10.7秒です。
|
363
|
+
得点(所要時間)は 10.7秒です。
|
363
364
|
|
364
365
|
2016年 1月 4日 19時 16分 39秒 0秒
|
365
366
|
得点(所要時間)は 10.0秒です。
|
@@ -369,10 +370,11 @@
|
|
369
370
|
|
370
371
|
count2は12
|
371
372
|
|
372
|
-
bestは
|
373
|
+
bestは8.0
|
373
374
|
|
374
|
-
|
375
|
+
cunt3は12
|
375
376
|
|
377
|
+
|
376
378
|
ファイルポインタの位置kaime_p1は「44」です。
|
377
379
|
mainのkaime_p(&kaime_p1)後のkの値は「44」です。
|
378
380
|
|