记录详情

Compile Error

foo.c: In function 'main':
foo.c:6:15: warning: multi-character character constant [-Wmultichar]
    6 |         scanf('%d',&x)
      |               ^~~~
foo.c:6:15: warning: passing argument 1 of 'scanf' makes pointer from integer without a cast [-Wint-conversion]
    6 |         scanf('%d',&x)
      |               ^~~~
      |               |
      |               int
In file included from foo.c:1:
/nix/store/3w4yrspgcx1z9wi18rv0hbap4jjlhx4c-glibc-2.37-8-dev/include/stdio.h:421:42: note: expected 'const char * restrict' but argument is of type 'int'
  421 | extern int scanf (const char *__restrict __format, ...) __wur;
      |                   ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
foo.c:6:23: error: expected ';' before 'while'
    6 |         scanf('%d',&x)
      |                       ^
      |                       ;
    7 |                 while(x%2==0&&x>0)
      |                 ~~~~~  
foo.c:5:21: warning: unused variable 't' [-Wunused-variable]
    5 |         int a=2,b,x,t;
      |                     ^
foo.c:5:17: warning: unused variable 'b' [-Wunused-variable]
    5 |         int a=2,b,x,t;
      |                 ^
foo.c:5:13: warning: unused variable 'a' [-Wunused-variable]
    5 |         int a=2,b,x,t;
      |             ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
A3-4 素数专题:验证哥德巴赫猜想
比赛
2023年新生赛(第一场)
语言
C
递交时间
2023-08-15 19:59:01
评测时间
2023-08-15 19:59:01
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes