记录详情

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 %d",a,n);
          ^
/in/foo.c:6:13: warning: format '%d' expects argument of type 'int *', but argument 3 has type 'int' [-Wformat=]
  scanf("%d %d",a,n);
             ^
/in/foo.c:8:6: error: 'i' undeclared (first use in this function)
  for(i=1;i<=n;i++)
      ^
/in/foo.c:8:6: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:11:2: error: expected ';' before '}' token
  }
  ^
/in/foo.c:5:13: warning: unused variable 'sum' [-Wunused-variable]
     int a,n,sum,pre;
             ^~~

信息

递交者
类型
自测
语言
C
递交时间
2024-11-20 21:26:45
评测时间
2024-11-20 21:26:45
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes