记录详情

Compile Error

/in/foo.c: In function 'main':
/in/foo.c:6:2: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
  for(int i=2;i<num;i++);
  ^~~
/in/foo.c:7:2: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'for'
  {
  ^
/in/foo.c:8:10: error: 'i' undeclared (first use in this function)
   if(num%i == 0);
          ^
/in/foo.c:8:10: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:8:3: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   if(num%i == 0);
   ^~
/in/foo.c:9:3: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
   {
   ^
/in/foo.c:10:13: warning: format '%d' expects a matching 'int' argument [-Wformat=]
    printf("%d")
             ^
/in/foo.c:11:3: error: expected ';' before '}' token
   }
   ^

信息

递交者
类型
递交
题目
A3-2 素数专题:素数判断
比赛
泰院2401程序设计基础作业赛第二场
语言
C
递交时间
2024-10-28 17:58:35
评测时间
2024-10-28 17:58:36
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes