记录详情

Compile Error

/in/foo.c: In function 'main':
/in/foo.c:3:1: error: parameter 'x' is initialized
 int n,x=1,sum=0
 ^~~
/in/foo.c:3:1: error: parameter 'sum' is initialized
/in/foo.c:4:2: 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:11: error: declaration for parameter 'sum' but no such parameter
 int n,x=1,sum=0
           ^~~
/in/foo.c:3:7: error: declaration for parameter 'x' but no such parameter
 int n,x=1,sum=0
       ^
/in/foo.c:3:5: 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:30:07
评测时间
2024-11-15 19:30:07
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes