Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
135499 万嘉宇 【基础题】100以内的偶数 C++ Compile Error 0 MS 0 KB 352 2025-11-04 19:14:52

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 main(){ int i,a; for(i=1,i<=50,i++){ a+=2; cout<<a<<" "; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:9:14: warning: right operand of comma operator has no effect [-Wunused-value]
     for(i=1,i<=50,i++){
              ^
Main.cc:9:22: error: expected ';' before ')' token
     for(i=1,i<=50,i++){
                      ^
Main.cc:13:5: error: expected primary-expression before 'return'
     return 0;
     ^
Main.cc:13:5: error: expected ';' before 'return'
Main.cc:13:5: error: expected primary-expression before 'return'
Main.cc:13:5: error: expected ')' before 'return'
Main.cc:8:11: warning: unused variable 'a' [-Wunused-variable]
     int i,a;
           ^