Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
131018 李茗宇 12奇数和与偶数和 C++ Compile Error 0 MS 0 KB 243 2025-09-20 16:56:30

Tests(0/0):


Code:

using namespace std; int main(){ int n,m,j=0,o=0; cin>>m>>n; for(int i=n;i>=m;i++){ if(n%2==0){ o+n; } else{ j+n; } } cout<<j<<endl<<o; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:4:5: error: 'cin' was not declared in this scope
     cin>>m>>n;
     ^
Main.cc:7:14: warning: statement has no effect [-Wunused-value]
             o+n;
              ^
Main.cc:10:14: warning: statement has no effect [-Wunused-value]
             j+n;
              ^
Main.cc:13:5: error: 'cout' was not declared in this scope
     cout<