Compile Error
foo.cc: In function ‘int main()’:
foo.cc:5:22: error: expected initializer before ‘>>’ token
    5 |         int xmin,xmax>>num;
      |                      ^~
foo.cc:6:20: error: ‘xmax’ was not declared in this scope; did you mean ‘fmax’?
    6 |         cin>>xmin>>xmax;
      |                    ^~~~
      |                    fmax
foo.cc:7:9: error: ‘num’ was not declared in this scope; did you mean ‘enum’?
    7 |         num=(xmax-xmin)/1+1;
      |         ^~~
      |         enum
foo.cc:8:33: error: expected primary-expression before ‘,’ token
    8 |         cout<<(xmin+xmax)*num/2<,endl;
      |                                 ^
  信息
- 递交者
 - 类型
 - 递交
 - 题目
 - A2-1 循环结构入门:数列求和
 - 语言
 - C++
 - 递交时间
 - 2024-04-12 15:27:54
 - 评测时间
 - 2024-04-12 15:27:54
 - 评测机
 
- 分数
 - 0
 - 总耗时
 - 0ms
 - 峰值内存
 - 0 Bytes