记录详情

Compile Error

/in/foo.c: In function 'main':
/in/foo.c:6:10: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'int' [-Wformat=]
  scanf("%d",a)
          ^
/in/foo.c:7:3: error: expected ';' before 'i'
   i=2;
   ^
/in/foo.c:8:8: error: 'n' undeclared (first use in this function)
  while(n>1)
        ^
/in/foo.c:8:8: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:10:9: error: lvalue required as left operand of assignment
   if(a%i=0)
         ^
/in/foo.c:12:4: error: expected ';' before 'n'
    n=n/i;
    ^

信息

递交者
类型
递交
题目
A3-1 素数专题:因子的和
比赛
中北 计算机2021级专业修读指导(1)
语言
C
递交时间
2021-11-30 18:40:06
评测时间
2021-11-30 18:40:06
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes