foo.c:2:1: warning: data definition has no type or storage class
2 | PrimeCount(int a[], int n);
| ^~~~~~~~~~
foo.c:2:1: warning: type defaults to 'int' in declaration of 'PrimeCount' [-Wimplicit-int]
foo.c:16:1: warning: return type defaults to 'int' [-Wimplicit-int]
16 | PrimeCount(int a[], int n) {
| ^~~~~~~~~~
foo.c: In function 'PrimeCount':
foo.c:21:20: warning: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
21 | for (j = 2; j <= sqrt(a[i]); j++) {
| ^~~~
foo.c:21:20: warning: incompatible implicit declaration of built-in function 'sqrt'
foo.c:2:1: note: include '<math.h>' or provide a declaration of 'sqrt'
1 | #include <stdio.h>
+++ |+#include <math.h>
2 | PrimeCount(int a[], int n);
foo.c:25:11: warning: incompatible implicit declaration of built-in function 'sqrt'
25 | if (j > sqrt(a[i]))
| ^~~~
foo.c:25:11: note: include '<math.h>' or provide a declaration of 'sqrt'
foo.c: In function 'main':
foo.c:6:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
6 | scanf("%d %d", &n1, &n2);
| ^~~~~~~~~~~~~~~~~~~~~~~~
foo.c:8:3: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
8 | scanf("%d", & a[i]);
| ^~~~~~~~~~~~~~~~~~~
foo.c:10:3: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
10 | scanf("%d", & b[i]);
| ^~~~~~~~~~~~~~~~~~~
foo.c: In function 'PrimeCount':
foo.c:29:1: warning: control reaches end of non-void function [-Wreturn-type]
29 | }
| ^
[Hydro](https://hydro.ac)提供评测服务