Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
137201 袁龙浩 函数求和 C++ Compile Error 0 MS 0 KB 343 2025-11-16 16:09:32

Tests(0/0):


Code:

#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 sum(int x,int y){ for(int x;x<=y;x++) } int main(){ int a,b; return 0; } cout<<x;


Run Info:

Main.cc: In function 'int sum(int, int)':
Main.cc:9:1: error: expected primary-expression before '}' token
 }
 ^
Main.cc:9:1: warning: no return statement in function returning non-void [-Wreturn-type]
Main.cc: In function 'int main()':
Main.cc:11:9: warning: unused variable 'a' [-Wunused-variable]
     int a,b;
         ^
Main.cc:11:11: warning: unused variable 'b' [-Wunused-variable]
     int a,b;
           ^
Main.cc: At global scope:
Main.cc:14:1: error: 'cout' does not name a type
 cout<