记录详情

Compile Error

/in/foo.c: In function 'main':
/in/foo.c:3:2: error: parameter 'x' is initialized
  int n,x=1,sum=0
  ^~~
/in/foo.c:3:2: error: parameter 'sum' is initialized
/in/foo.c:4:1: error: expected ',' or ';' before 'scanf'
 scanf("%d"&n);
 ^~~~~
/in/foo.c:5:2: error: expected declaration specifiers before 'for'
  for(int i =1;i<=n;i++){
  ^~~
/in/foo.c:5:15: error: expected declaration specifiers before 'i'
  for(int i =1;i<=n;i++){
               ^
/in/foo.c:5:20: error: expected declaration specifiers before 'i'
  for(int i =1;i<=n;i++){
                    ^
/in/foo.c:9:1: error: expected declaration specifiers before 'print'
 print("%d",sum);
 ^~~~~
/in/foo.c:10:1: error: expected declaration specifiers before '}' token
 }
 ^
/in/foo.c:3:12: error: declaration for parameter 'sum' but no such parameter
  int n,x=1,sum=0
            ^~~
/in/foo.c:3:8: error: declaration for parameter 'x' but no such parameter
  int n,x=1,sum=0
        ^
/in/foo.c:3:6: error: declaration for parameter 'n' but no such parameter
  int n,x=1,sum=0
      ^
/in/foo.c:10:1: error: expected '{' at end of input
 }
 ^

信息

递交者
类型
自测
语言
C
递交时间
2024-11-15 19:27:01
评测时间
2024-11-15 19:27:01
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes