Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
140552 李亭绪 找最大的数 C++ Compile Error 0 MS 0 KB 224 2025-12-16 19:52:54

Tests(0/0):


Code:

#include<iostream> using namespace std; int a[10]; int main(){ int m,s; for(int i=0;i<10;i++) { cin>>a[i]; } m=a[0]; s=0; for(int i=1;i<10;i++){ if(a[i]>max){ m=a[i]; s=i; } } cout<<s+1<<endl; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:13:9: error: invalid operands of types 'int' and '' to binary 'operator>'
 if(a[i]>max){
         ^