foo.c: In function 'main':
foo.c:10:25: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'int' [-Wformat=]
10 | scanf("%d %d", time[i], cnt[i]);
| ~^ ~~~~~~~
| | |
| int * int
foo.c:10:28: warning: format '%d' expects argument of type 'int *', but argument 3 has type 'int' [-Wformat=]
10 | scanf("%d %d", time[i], cnt[i]);
| ~^ ~~~~~~
| | |
| int * int
foo.c:10:17: warning: 'cnt' may be used uninitialized [-Wmaybe-uninitialized]
10 | scanf("%d %d", time[i], cnt[i]);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foo.c:7:13: note: 'cnt' declared here
7 | int cnt[100];
| ^~~
foo.c:10:17: warning: 'time' may be used uninitialized [-Wmaybe-uninitialized]
10 | scanf("%d %d", time[i], cnt[i]);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foo.c:6:13: note: 'time' declared here
6 | int time[100];
| ^~~~
foo.c:25:13: warning: 'sum' may be used uninitialized [-Wmaybe-uninitialized]
25 | sum = sum + 20 * error;
| ~~~~^~~~~~~~~~~~~~~~~~
foo.c:18:13: note: 'sum' was declared here
18 | int sum,m = 0;
| ^~~
[Hydro](https://hydro.ac)提供评测服务