Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
148652 马俊潇 12奇数和与偶数和 C++ Compile Error 0 MS 0 KB 191 2026-02-28 14:34:19

Tests(0/0):


Code:

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


Run Info:

Main.cc: In function 'int main()':
Main.cc:8:8: error: expected primary-expression before ';' token
     i+=;
        ^
Main.cc:10:8: error: expected primary-expression before ';' token
     i+=;}}
        ^
Main.cc:4:12: warning: unused variable 'a' [-Wunused-variable]
    int n,m,a=0;
            ^