记录详情

Compile Error

/in/foo.c: In function 'fun':
/in/foo.c:6:20: error: 'x' undeclared (first use in this function)
         for(i=1;i<=x;i++)
                    ^
/in/foo.c:6:20: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:8:16: error: 'n' undeclared (first use in this function)
             if(n%i==0)
                ^
/in/foo.c:13:12: warning: 'return' with a value, in function returning void
     return sum;
            ^~~
/in/foo.c:2:6: note: declared here
 void fun()
      ^~~
/in/foo.c: In function 'main':
/in/foo.c:20:13: error: 'n' undeclared (first use in this function)
     sum=fun(n);
             ^

信息

递交者
类型
自测
题目
A3-1 素数专题:因子的和
语言
C
递交时间
2019-10-07 19:57:17
评测时间
2019-10-07 19:57:17
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes