Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
159581 曾钰涵 12奇数和与偶数和 C++ Compile Error 0 MS 0 KB 227 2026-09-05 16:01:31

Tests(0/0):


Code:

#include<iostream> using namespace std; int main(){ int m,n; cin>>m>>n; for(int i=m;i<=n;i++){ if(i%2==0)osum+=i; else jsum+=i; cout<<osum<<' '<<jsum; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:7:19: error: 'osum' was not declared in this scope
         if(i%2==0)osum+=i;
                   ^
Main.cc:8:18: error: 'jsum' was not declared in this scope
             else jsum+=i;
                  ^
Main.cc:9:19: error: 'osum' was not declared in this scope
             cout<