记录详情

Compile Error

foo.c:2:1: error: unknown type name ‘using’
    2 | using namespace std;
      | ^~~~~
foo.c:2:17: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘std’
    2 | using namespace std;
      |                 ^~~
foo.c: In function ‘main’:
foo.c:14:5: error: ‘cin’ undeclared (first use in this function)
   14 |     cin>>n;
      |     ^~~
foo.c:14:5: note: each undeclared identifier is reported only once for each function it appears in
foo.c:15:9: error: expected expression before ‘:’ token
   15 |     std::cout << fibonacci(n);  // 输出斐波那契数列的第n项
      |         ^
foo.c:15:5: warning: label ‘std’ defined but not used [-Wunused-label]
   15 |     std::cout << fibonacci(n);  // 输出斐波那契数列的第n项
      |     ^~~

信息

递交者
类型
递交
题目
A2-2 循环结构入门:斐波拉契数列
语言
C
递交时间
2024-08-14 20:40:52
评测时间
2024-08-14 20:40:52
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes