记录详情

Compile Error

foo.cc: In function 'int main()':
foo.cc:38:12: error: expected ';' before ')' token
   38 |    for (--n)
      |            ^
      |            ;
foo.cc:45:4: error: expected primary-expression before 'return'
   45 |    return 0;
      |    ^~~~~~
foo.cc:44:20: error: expected ')' before 'return'
   44 |    printf("%d", a);
      |                    ^
      |                    )
   45 |    return 0;
      |    ~~~~~~           
foo.cc:38:8: note: to match this '('
   38 |    for (--n)
      |        ^
foo.cc:35:14: warning: unused variable 'b' [-Wunused-variable]
   35 |    int n, a, b;
      |              ^
foo.cc:36:9: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   36 |    scanf("%d", &n);
      |    ~~~~~^~~~~~~~~~
foo.cc:37:9: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   37 |    scanf("%d", &a);
      |    ~~~~~^~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
1-3 序列循环左移
语言
C++
递交时间
2022-08-09 20:49:38
评测时间
2022-08-09 20:49:38
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes