记录详情

Compile Error

foo.c: In function 'main':
foo.c:6:4: warning: implicit declaration of function 'judge' [-Wimplicit-function-declaration]
    6 |  {(judge(x)==0&&judge(y)==0)?printf("%d+%d=%d";y,x,a):a ;
      |    ^~~~~
foo.c:6:47: error: expected ')' before ';' token
    6 |  {(judge(x)==0&&judge(y)==0)?printf("%d+%d=%d";y,x,a):a ;
      |                                    ~          ^
      |                                               )
foo.c:6:39: warning: format '%d' expects a matching 'int' argument [-Wformat=]
    6 |  {(judge(x)==0&&judge(y)==0)?printf("%d+%d=%d";y,x,a):a ;
      |                                      ~^
      |                                       |
      |                                       int
foo.c:6:42: warning: format '%d' expects a matching 'int' argument [-Wformat=]
    6 |  {(judge(x)==0&&judge(y)==0)?printf("%d+%d=%d";y,x,a):a ;
      |                                         ~^
      |                                          |
      |                                          int
foo.c:6:45: warning: format '%d' expects a matching 'int' argument [-Wformat=]
    6 |  {(judge(x)==0&&judge(y)==0)?printf("%d+%d=%d";y,x,a):a ;
      |                                            ~^
      |                                             |
      |                                             int
foo.c: In function 'judge':
foo.c:14:6: warning: type of 'n' defaults to 'int' [-Wimplicit-int]
   14 |  int judge (n)
      |      ^~~~~
foo.c:22:7: error: expected expression before 'return'
   22 |  o==0?return 0:return 1;
      |       ^~~~~~
foo.c:25:3: warning: no return statement in function returning non-void [-Wreturn-type]
   25 |   }
      |   ^
foo.c: In function 'main':
foo.c:3:22: warning: unused variable 'n' [-Wunused-variable]
    3 | {int a=0,x=0,y=0,m=0,n=0,o=0;
      |                      ^
foo.c: At top level:
foo.c:14:6: warning: 'judge' defined but not used [-Wunused-function]
   14 |  int judge (n)
      |      ^~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
自测
题目
A3-4 素数专题:验证哥德巴赫猜想
语言
C
递交时间
2023-10-01 09:17:26
评测时间
2023-10-01 09:17:26
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes