记录详情

Compile Error

foo.c: In function 'main':
foo.c:6:9: warning: implicit declaration of function 'srand' [-Wimplicit-function-declaration]
    6 |         srand(time(NULL));
      |         ^~~~~
foo.c:6:15: warning: implicit declaration of function 'time' [-Wimplicit-function-declaration]
    6 |         srand(time(NULL));
      |               ^~~~
foo.c:7:11: warning: implicit declaration of function 'rand' [-Wimplicit-function-declaration]
    7 |         r=rand()%1000;
      |           ^~~~
foo.c:8:12: warning: implicit declaration of function 'prime' [-Wimplicit-function-declaration]
    8 |         if(prime(r))
      |            ^~~~~
foo.c:11:9: error: 'else' without a previous 'if'
   11 |         else
      |         ^~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
A3-2 素数专题:素数判断
比赛
2022年迎新赛(第一场)
语言
C
递交时间
2022-08-15 19:24:04
评测时间
2022-08-15 19:24:04
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes