记录详情

Compile Error

foo.c: In function ‘main’:
foo.c:7:5: error: ‘while(a’ undeclared (first use in this function)
    7 |     while(a)
      |     ^~~~~~~~
foo.c:7:5: note: each undeclared identifier is reported only once for each function it appears in
foo.c:7:13: error: expected ‘;’ before ‘)’ token
    7 |     while(a)
      |             ^
      |             ;
foo.c:7:13: error: expected statement before ‘)’ token
foo.c:8:14: error: ‘i’ undeclared (first use in this function)
    8 |         {for(i=2,i<a'i++);
      |              ^
foo.c:8:21: warning: missing terminating ' character
    8 |         {for(i=2,i<a'i++);
      |                     ^
foo.c:8:21: error: missing terminating ' character
    8 |         {for(i=2,i<a'i++);
      |                     ^~~~~~
foo.c:8:17: warning: left-hand operand of comma expression has no effect [-Wunused-value]
    8 |         {for(i=2,i<a'i++);
      |                 ^
foo.c:8:21: error: expected ‘;’ before ‘if’
    8 |         {for(i=2,i<a'i++);
      |                     ^
      |                     ;
    9 |          if(a/i==0) break;
      |          ~~          
foo.c:10:12: error: expected expression before ‘if’
   10 |            if(i==a);
      |            ^~
foo.c:11:17: error: expected ‘)’ before ‘;’ token
   11 |            a/=10;
      |                 ^
      |                 )
foo.c:8:13: note: to match this ‘(’
    8 |         {for(i=2,i<a'i++);
      |             ^
foo.c:13:9: error: expected expression before ‘}’ token
   13 |         }
      |         ^
foo.c:14:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
   14 |         if(!a);
      |         ^~
foo.c:15:12: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
   15 |            printf("yes");
      |            ^~~~~~
foo.c:16:9: error: ‘else’ without a previous ‘if’
   16 |         else
      |         ^~~~
foo.c:18:17: error: expected ‘;’ before ‘}’ token
   18 |         return 0
      |                 ^
      |                 ;
   19 | }
      | ~                

信息

递交者
类型
递交
题目
A5-1 超级素数判断
语言
C
递交时间
2024-08-21 09:53:59
评测时间
2024-08-21 09:53:59
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes