记录详情

Compile Error

/in/foo.c: In function 'main':
/in/foo.c:5:7: warning: comparison of constant '10000000' with boolean expression is always true [-Wbool-compare]
    5 |   3<=n<=10000000;
      |       ^~
/in/foo.c:5:4: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses]
    5 |   3<=n<=10000000;
      |   ~^~~
/in/foo.c:5:3: warning: statement with no effect [-Wunused-value]
    5 |   3<=n<=10000000;
      |   ^
/in/foo.c:7:7: error: 'i' undeclared (first use in this function)
    7 |   for(i=2,2<i<n,i++)
      |       ^
/in/foo.c:7:7: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:7:10: warning: left-hand operand of comma expression has no effect [-Wunused-value]
    7 |   for(i=2,2<i<n,i++)
      |          ^
/in/foo.c:7:16: warning: left-hand operand of comma expression has no effect [-Wunused-value]
    7 |   for(i=2,2<i<n,i++)
      |                ^
/in/foo.c:7:20: error: expected ';' before ')' token
    7 |   for(i=2,2<i<n,i++)
      |                    ^
      |                    ;
/in/foo.c:7:20: error: expected expression before ')' token
/in/foo.c:8:16: error: expected expression before '=' token
    8 |      { if(n%i!==0)
      |                ^
/in/foo.c:11:8: error: 'else' without a previous 'if'
   11 |        else printf("n is a primer")     ;
      |        ^~~~

信息

递交者
类型
自测
语言
C
递交时间
2025-11-13 15:30:43
评测时间
2025-11-13 15:30:43
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes