Compile Error

foo.cc: In function 'int main()':
foo.cc:7:10: error: expected ';' before ')' token
    7 |  for (1<a)
      |          ^
      |          ;
foo.cc:7:8: warning: statement has no effect [-Wunused-value]
    7 |  for (1<a)
      |       ~^~
foo.cc:12:2: error: expected primary-expression before 'return'
   12 |  return 0;
      |  ^~~~~~
foo.cc:11:6: error: expected ';' before 'return'
   11 |     }
      |      ^
      |      ;
   12 |  return 0;
      |  ~~~~~~
foo.cc:12:2: error: expected primary-expression before 'return'
   12 |  return 0;
      |  ^~~~~~
foo.cc:11:6: error: expected ')' before 'return'
   11 |     }
      |      ^
      |      )
   12 |  return 0;
      |  ~~~~~~
foo.cc:7:6: note: to match this '('
    7 |  for (1<a)
      |      ^
foo.cc:5:8: warning: unused variable 'c' [-Wunused-variable]
    5 |  int a,c;
      |        ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1030 1~N求和
语言
C++
递交时间
2022-07-09 20:29:33
评测时间
2022-07-09 20:29:33
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes