回答編集履歴
1
mllocの位置を修正しました。
answer
CHANGED
@@ -7,11 +7,11 @@
|
|
7
7
|
int i;
|
8
8
|
printf("何個の整数を入力しますか→");
|
9
9
|
scanf("%d",&try_count);
|
10
|
-
//try_count×int型サイズのmalloc
|
11
10
|
if (try_count < 1 || trey_count > 100){
|
12
11
|
printf("入力値不正:%d\n",try_count);
|
13
12
|
return 1;
|
14
13
|
}
|
14
|
+
//try_count×int型サイズのmalloc
|
15
15
|
for (i = 0; i < try_count;i++){
|
16
16
|
//なにがしかの処理
|
17
17
|
}
|