Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
117196 | 黄枳润 | 函数求和 | C++ | Compile Error | 0 MS | 0 KB | 439 | 2025-04-14 20:07:18 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int a(int x,int y){ int sum=0; for(int i=x;i<=y;i++){ sum+=i } } int main(){ cout<<a(1,10)<<endl; cout<<a(20,30)<<endl; cout<<a(35,45)<<endl; return 0; }
Main.cc: In function 'int a(int, int)': Main.cc:11:5: error: expected ';' before '}' token } ^ Main.cc:12:1: warning: no return statement in function returning non-void [-Wreturn-type] } ^