Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
160438 鸡哥 18成绩查找 C++ Compile Error 0 MS 0 KB 268 2026-09-19 13:52:27

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int a[100]={0},n,f; cin>>n; for(int i=1,i<=n;i++){ cin>>a[i]; } cin>>f; for(int i=1;i<=n;i++){ if(a[i] >100){ a[i]=f; } } for(int i=1,i<=n;i++){ cout<<a[i]; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:6:15: error: expected ';' before '<=' token
  for(int i=1,i<=n;i++){
               ^
Main.cc:6:15: error: expected primary-expression before '<=' token
Main.cc:15:15: error: expected ';' before '<=' token
  for(int i=1,i<=n;i++){
               ^
Main.cc:15:15: error: expected primary-expression before '<=' token