记录详情

Compile Error

foo.cc: In function 'int main()':
foo.cc:6:19: error: 'b' was not declared in this scope
    6 |         int a = 1;b = 1;
      |                   ^
foo.cc:9:13: warning: init-statement in selection statements only available with '-std=c++17' or '-std=gnu++17' [-Wc++17-extensions]
    9 |         if (k <= 2) (
      |             ^
foo.cc:9:18: error: unable to find numeric literal operator 'operator""\U0000ff09'
    9 |         if (k <= 2) (
      |                  ^~~
foo.cc:9:18: note: use '-fext-numeric-literals' to enable more built-in suffixes
foo.cc:11:9: error: expected primary-expression before 'return'
   11 |         return 0;
      |         ^~~~~~
foo.cc:10:21: error: expected ')' before 'return'
   10 |         printf("1");
      |                     ^
      |                     )
   11 |         return 0;
      |         ~~~~~~       
foo.cc:9:12: note: to match this '('
    9 |         if (k <= 2) (
      |            ^
foo.cc:15:22: error: expected ')' before ';' token
   15 |                 c=a+b;
      |                      ^
      |                      )
foo.cc:14:38: note: to match this '('
   14 |         for (int i = 3; i <= k; i++) (
      |                                      ^
foo.cc:19:22: error: 'c' was not declared in this scope
   19 |         printf("%d", c);
      |                      ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
A2-2 循环结构入门:斐波拉契数列
比赛
2023年新生赛(第一场)
语言
C++
递交时间
2023-08-15 16:22:05
评测时间
2023-08-15 16:22:05
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes