Compile Error

foo.cc:7:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    7 | main() {
      |      ^
foo.cc: In function 'int main()':
foo.cc:9:35: error: expected ';' before 'return'
    9 |  for(int i = 1; i <= N; i++) scanf
      |                                   ^
      |                                   ;
   10 |  return 0;
      |  ~~~~~~                            
foo.cc:9:30: warning: statement is a reference, not call, to function 'scanf' [-Waddress]
    9 |  for(int i = 1; i <= N; i++) scanf
      |                              ^~~~~
foo.cc:9:30: warning: statement has no effect [-Wunused-value]
foo.cc:8:10: warning: unused variable 'L' [-Wunused-variable]
    8 |  int N , L;
      |          ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
「一本通 1.2 例 2」Best Cow Fences
语言
C++
递交时间
2022-02-17 13:45:13
评测时间
2022-02-17 13:45:13
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes