foo.c:23:6: warning: return type of 'main' is not 'int' [-Wmain]
23 | void main()
| ^~~~
foo.c:43:6: warning: return type of 'main' is not 'int' [-Wmain]
43 | void main()
| ^~~~
foo.c:43:6: error: redefinition of 'main'
foo.c:23:6: note: previous definition of 'main' was here
23 | void main()
| ^~~~
foo.c: In function 'main':
foo.c:55:28: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long int' [-Wformat=]
55 | printf("sum=%ld,Total=%d,Max=%d",sps,spn,spm);
| ~^ ~~~
| | |
| int long int
| %ld
foo.c:55:35: warning: format '%d' expects argument of type 'int', but argument 4 has type 'long int' [-Wformat=]
55 | printf("sum=%ld,Total=%d,Max=%d",sps,spn,spm);
| ~^ ~~~
| | |
| int long int
| %ld
foo.c: In function 'IsPrime':
foo.c:64:30: error: expected expression before 'double'
64 | for(int j=2; j<=sqrt(double(number)); j++){
| ^~~~~~
foo.c: In function 'main':
foo.c:27:1: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
27 | scanf("%d",&start);
| ^~~~~~~~~~~~~~~~~~
foo.c:29:1: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
29 | scanf("%d",&end);
| ^~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务