记录详情

Compile Error

foo.c: In function 'main':
foo.c:10:5: warning: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
   10 |   a=sqrt(j)+1;
      |     ^~~~
foo.c:10:5: 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 | int main()
foo.c:13:12: error: expected expression before ')' token
   13 |    if(j%y==)
      |            ^
foo.c:29:5: error: stray '\357' in program
   29 |   if(j&&k)
      |     ^
foo.c:29:6: error: stray '\274' in program
   29 |   if(j&&k)
      |      ^
foo.c:29:7: error: stray '\210' in program
   29 |   if(j&&k)
      |       ^
foo.c:29:8: error: expected '(' before 'j'
   29 |   if(j&&k)
      |        ^
      |        (
foo.c:29:8: warning: statement with no effect [-Wunused-value]
foo.c:29:3: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   29 |   if(j&&k)
      |   ^~
foo.c:29:12: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
   29 |   if(j&&k)
      |            ^
foo.c:29:12: error: expected statement before ')' token
foo.c:6:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
    6 |  scanf("%d",&i);
      |  ^~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
A3-4 素数专题:验证哥德巴赫猜想
比赛
2022春 C语言课程设计 作业1
语言
C
递交时间
2022-02-28 20:20:21
评测时间
2022-02-28 20:20:21
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes