记录详情

Compile Error

foo.cc:3:5: error: expected initializer before ‘if’
    3 |     if (n == 1)
      |     ^~
foo.cc:5:5: error: expected unqualified-id before ‘else’
    5 |     else if (n == 2)
      |     ^~~~
foo.cc:7:5: error: expected unqualified-id before ‘else’
    7 |     else
      |     ^~~~
foo.cc:9:1: error: expected declaration before ‘}’ token
    9 | }
      | ^
foo.cc: In function ‘int main()’:
foo.cc:13:5: error: ‘cin’ was not declared in this scope
   13 |     cin<<k1<<k2;
      |     ^~~
foo.cc:14:10: warning: statement has no effect [-Wunused-value]
   14 |     for (k1; k1<=k2; k1++)
      |          ^~
foo.cc:15:9: error: ‘cout’ was not declared in this scope
   15 |         cout<<def(k1);
      |         ^~~~
foo.cc:15:15: error: ‘def’ was not declared in this scope
   15 |         cout<<def(k1);
      |               ^~~

信息

递交者
类型
自测
题目
1-2 斐波那契数列的和
语言
C++
递交时间
2024-08-20 03:22:16
评测时间
2024-08-20 03:22:16
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes