记录详情

Compile Error

/in/foo.c:3:6: warning: return type of 'main' is not 'int' [-Wmain]
 void main()
      ^~~~
/in/foo.c:12:1: warning: data definition has no type or storage class
 k=1 s=0+1;
 ^
/in/foo.c:12:1: warning: type defaults to 'int' in declaration of 'k' [-Wimplicit-int]
/in/foo.c:12:5: error: expected ',' or ';' before 's'
 k=1 s=0+1;
     ^
/in/foo.c:13:1: warning: data definition has no type or storage class
 k=2 s=3;
 ^
/in/foo.c:13:1: warning: type defaults to 'int' in declaration of 'k' [-Wimplicit-int]
/in/foo.c:13:1: error: redefinition of 'k'
/in/foo.c:12:1: note: previous definition of 'k' was here
 k=1 s=0+1;
 ^
/in/foo.c:13:5: error: expected ',' or ';' before 's'
 k=2 s=3;
     ^
/in/foo.c:14:1: warning: data definition has no type or storage class
 k=2*3 s=9;
 ^
/in/foo.c:14:1: warning: type defaults to 'int' in declaration of 'k' [-Wimplicit-int]
/in/foo.c:14:1: error: redefinition of 'k'
/in/foo.c:12:1: note: previous definition of 'k' was here
 k=1 s=0+1;
 ^
/in/foo.c:14:7: error: expected ',' or ';' before 's'
 k=2*3 s=9;
       ^
/in/foo.c:15:1: warning: data definition has no type or storage class
 k=6*4 s=24+9=33;
 ^
/in/foo.c:15:1: warning: type defaults to 'int' in declaration of 'k' [-Wimplicit-int]
/in/foo.c:15:1: error: redefinition of 'k'
/in/foo.c:12:1: note: previous definition of 'k' was here
 k=1 s=0+1;
 ^
/in/foo.c:15:7: error: expected ',' or ';' before 's'
 k=6*4 s=24+9=33;
       ^

信息

递交者
类型
递交
题目
P1017 C语言:循环结构(阶乘之和)
语言
C
递交时间
2020-05-15 22:02:32
评测时间
2020-05-15 22:02:32
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes