Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
61246 张誉腾 19选班长II C++ Compile Error 0 MS 0 KB 467 2023-12-03 11:53:46

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main() { int xz[4]= {0},p,sum=0; while(1) { cin>>p if(p==-1) { break; } sum++; if(p<4&&p>0) { xz[p]++ } } cout<<"A="<<xz[1]<<endl; cout<<"B="<<xz[2]<<endl; cout<<"C="<<xz[3]<<endl; cout<<"Tot="<<sum<<endl; if(xz[1]=a<sum/2) { cout<<"A-yes" } else if(xz[2]=b<sum/2) { cout<<"B-yes" } else if(xz[3]=b<sum/2) { cout<<"C-yes" } else { cout<<"all-NO" } }


Run Info:

Main.cc: In function 'int main()':
Main.cc:9:3: error: expected ';' before 'if'
   if(p==-1) {
   ^
Main.cc:15:3: error: expected ';' before '}' token
   }
   ^
Main.cc:21:11: error: 'a' was not declared in this scope
  if(xz[1]=a