记录详情

Compile Error

foo.c: In function 'main':
foo.c:6:15: warning: multi-character character constant [-Wmultichar]
    6 |         scanf('%d',&a);
      |               ^~~~
foo.c:6:15: warning: passing argument 1 of 'scanf' makes pointer from integer without a cast [-Wint-conversion]
    6 |         scanf('%d',&a);
      |               ^~~~
      |               |
      |               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:7:9: warning: this 'while' clause does not guard... [-Wmisleading-indentation]
    7 |         while(a>0);
      |         ^~~~~
foo.c:8:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'while'
    8 |         {
      |         ^
foo.c:9:24: warning: right-hand operand of comma expression has no effect [-Wunused-value]
    9 |                 for(b=2,b<a,b++)
      |                        ^
foo.c:9:32: error: expected ';' before ')' token
    9 |                 for(b=2,b<a,b++)
      |                                ^
      |                                ;
foo.c:9:32: error: expected expression before ')' token
foo.c:11:35: warning: multi-character character constant [-Wmultichar]
   11 |                            printf('No');
      |                                   ^~~~
foo.c:11:35: warning: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion]
   11 |                            printf('No');
      |                                   ^~~~
      |                                   |
      |                                   int
/nix/store/3w4yrspgcx1z9wi18rv0hbap4jjlhx4c-glibc-2.37-8-dev/include/stdio.h:356:43: note: expected 'const char * restrict' but argument is of type 'int'
  356 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
foo.c:13:35: warning: multi-character character constant [-Wmultichar]
   13 |                            printf('Yes')
      |                                   ^~~~~
foo.c:13:35: warning: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion]
   13 |                            printf('Yes')
      |                                   ^~~~~
      |                                   |
      |                                   int
/nix/store/3w4yrspgcx1z9wi18rv0hbap4jjlhx4c-glibc-2.37-8-dev/include/stdio.h:356:43: note: expected 'const char * restrict' but argument is of type 'int'
  356 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
foo.c:13:41: error: expected ';' before '}' token
   13 |                            printf('Yes')
      |                                         ^
      |                                         ;
   14 |         }
      |         ~                                
[Hydro](https://hydro.ac)提供评测服务

信息

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