Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
7294 刘芃伽 找最大的数 C++ Compile Error 0 MS 0 KB 676 2025-04-18 23:39:15

Tests(0/0):


Code:

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


Run Info:

Main.cc:14:17: error: stray '#' in program
             b=i;#include
                 ^
Main.cc: In function 'int main()':
Main.cc:14:18: error: 'include' was not declared in this scope
             b=i;#include
                  ^
Main.cc:14:34: error: expected primary-expression before '>' token
             b=i;#include
                                  ^
Main.cc:18:1: error: expected primary-expression before 'using'
 using namespace std;
 ^
Main.cc:18:1: error: expected ';' before 'using'
Main.cc:19:11: error: a function-definition is not allowed here before '{' token
 int main(){
           ^
Main.cc:39:1: error: expected '}' at end of input
 }
 ^
Main.cc:39:1: error: expected '}' at end of input
Main.cc:39:1: error: expected '}' at end of input