Compile Error

foo.cc: In function 'int main()':
foo.cc:4:2: error: 'undefined' was not declared in this scope
    4 | {undefined
      |  ^~~~~~~~~
foo.cc:6:10: error: 'm' was not declared in this scope; did you mean 'tm'?
    6 |     cin>>m>>n;
      |          ^
      |          tm
foo.cc:6:13: error: 'n' was not declared in this scope
    6 |     cin>>m>>n;
      |             ^
foo.cc:8:15: error: expected ';' before 'for'
    8 |     {undefined
      |               ^
      |               ;
    9 |         for(i=n;i>=m;i-=2)
      |         ~~~    
foo.cc:9:17: error: 'i' was not declared in this scope
    9 |         for(i=n;i>=m;i-=2)
      |                 ^
foo.cc:13:15: error: 'sum' was not declared in this scope
   13 |         cout<<sum;
      |               ^~~
foo.cc:16:20: error: expected ';' before 'cout'
   16 |          {undefined
      |                    ^
      |                    ;
   17 |              cout<<0;
      |              ~~~~   
foo.cc:20:20: error: expected ';' before 'for'
   20 |          {undefined
      |                    ^
      |                    ;
   21 |              for(i=n-1;i>=m;i-=2)
      |              ~~~    
foo.cc:21:24: error: 'i' was not declared in this scope
   21 |              for(i=n-1;i>=m;i-=2)
      |                        ^
foo.cc:25:20: error: 'sum' was not declared in this scope
   25 |              cout<<sum;
      |                    ^~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P2359 1.5.9:奇数求和
语言
C++
递交时间
2022-01-09 14:30:28
评测时间
2022-01-09 14:30:28
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes