Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
135942 张咏灏 输出不及格学生的成绩 C++ Compile Error 0 MS 0 KB 398 2025-11-08 17:38:30

Tests(0/0):


Code:

#include<iostream> using namespace std; int main(){ int a[4],b[4],c[4]; for(int i=0;i<3;i++){ for(int j=0;j<4;j++){ if(i=1){ cin>>a[j]; }else if(i=2){ cin>>b[j] }else{ cin>>c[j]; } } } for(int j=0;j<10;j++){ cout<<a[j]<<" "; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:7:19: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
             if(i=1){
                   ^
Main.cc:9:25: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
             }else if(i=2){
                         ^
Main.cc:11:13: error: expected ';' before '}' token
             }else{
             ^