Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
94650 梁敖铭 累加问题 C++ Compile Error 0 MS 0 KB 429 2024-10-26 08:52:59

Tests(0/0):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cstdlib> #include<ctime> #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() void a(int x){ cout<<x++<<endl; return x; } int main(){ int x=1; for(int i=1;i<=100;i++){ a(x); } cout<<x; return 0; }


Run Info:

Main.cc: In function 'void a(int)':
Main.cc:9:5: error: 'cout' was not declared in this scope
     cout<& __os)
     ^
Main.cc:12:12: error: return-statement with a value, in function returning 'void' [-fpermissive]
     return x;
            ^
Main.cc: In function 'int main()':
Main.cc:19:5: error: 'cout' was not declared in this scope
     cout<