记录详情

Compile Error

/in/foo.c: In function 'main':
/in/foo.c:6:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    int f{20}={1,1};
         ^
/in/foo.c:6:10: warning: statement with no effect [-Wunused-value]
    int f{20}={1,1};
          ^~
/in/foo.c:6:12: error: expected ';' before '}' token
    int f{20}={1,1};
            ^
/in/foo.c:6:13: error: expected expression before '=' token
    int f{20}={1,1};
             ^
/in/foo.c:7:11: warning: right-hand operand of comma expression has no effect [-Wunused-value]
    for(i=0,i<20,i++)
           ^
/in/foo.c:7:20: error: expected ';' before ')' token
    for(i=0,i<20,i++)
                    ^
/in/foo.c:7:20: error: expected expression before ')' token
/in/foo.c:8:5: error: 'f' undeclared (first use in this function)
     f{i}=f{i-1}+{i-2};
     ^
/in/foo.c:8:5: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:8:6: error: expected ';' before '{' token
     f{i}=f{i-1}+{i-2};
      ^
/in/foo.c:9:21: error: expected ')' before '}' token
     for(i=0;i<20;i++}
                     ^
/in/foo.c:9:21: error: expected expression before '}' token
/in/foo.c: At top level:
/in/foo.c:10:4: error: expected identifier or '(' before '{' token
    {
    ^
/in/foo.c:14:11: error: expected declaration specifiers or '...' before string constant
    printf("\n");
           ^~~~
/in/foo.c:15:4: error: expected identifier or '(' before 'return'
    return 0:
    ^~~~~~

信息

递交者
类型
递交
题目
P1005 斐波那契数列
语言
C
递交时间
2024-08-18 15:43:59
评测时间
2024-08-18 15:43:59
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes