Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
156241 杜禹轩 函数求和 C++ Compile Error 0 MS 0 KB 214 2026-06-27 14:35:25

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int me(int a,int b) { int m; for(int i=a,i<=b;i++){ m+=i; } return m; } int main() { cout<<m(1,10); cout<<m(20,30); cout<<m(35,45); return 0; }


Run Info:

Main.cc: In function 'int me(int, int)':
Main.cc:5:15: error: expected ';' before '<=' token
  for(int i=a,i<=b;i++){
               ^
Main.cc:5:15: error: expected primary-expression before '<=' token
Main.cc: In function 'int main()':
Main.cc:11:14: error: 'm' was not declared in this scope
  cout<