Compile Error

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)提供评测服务

信息

递交者
类型
递交
题目
P1101 A、B之间的超级素数
语言
C
递交时间
2022-04-25 11:50:27
评测时间
2022-04-25 11:50:27
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes