foo.c: In function 'gcd':
foo.c:6:5: error: 'res' undeclared (first use in this function)
6 | res = a % b;
| ^~~
foo.c:6:5: note: each undeclared identifier is reported only once for each function it appears in
foo.c: In function 'main':
foo.c:32:12: warning: implicit declaration of function 'free' [-Wimplicit-function-declaration]
32 | b =free(a[j], b);
| ^~~~
foo.c:32:12: warning: incompatible implicit declaration of built-in function 'free'
foo.c:2:1: note: include '<stdlib.h>' or provide a declaration of 'free'
1 | #include <stdio.h>
+++ |+#include <stdlib.h>
2 | #define A 1000
foo.c:32:18: warning: passing argument 1 of 'free' makes pointer from integer without a cast [-Wint-conversion]
32 | b =free(a[j], b);
| ~^~~
| |
| int
foo.c:32:18: note: expected 'void *' but argument is of type 'int'
foo.c:32:12: error: too many arguments to function 'free'
32 | b =free(a[j], b);
| ^~~~
foo.c:32:11: error: void value not ignored as it ought to be
32 | b =free(a[j], b);
| ^
foo.c:18:5: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
18 | scanf("%d", &n);
| ^~~~~~~~~~~~~~~
foo.c:21:9: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
21 | scanf("%d", &a[i]);
| ^~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务