Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
65434 余慕涵 函数求和 C++ Compile Error 0 MS 0 KB 263 2024-01-25 18:24:33

Tests(0/0):


Code:

#include <iostream> #include <cstdio> using namespace std; int a(int l,int p,int o){ for (l;l<=p;l++) o+=l; return o; } int main(){ int n,m,g=0; cout<<a(1,10)<<a(20,30)<<a(35,45); return 0; }


Run Info:

Main.cc: In function 'int a(int, int, int)':
Main.cc:6:11: warning: statement has no effect [-Wunused-value]
     for (l;l<=p;l++)
           ^
Main.cc: In function 'int main()':
Main.cc:13:17: error: too few arguments to function 'int a(int, int, int)'
     cout<