Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
98928 罗迎甲 找最大的数 C++ Compile Error 0 MS 0 KB 554 2024-11-23 17:59:11

Tests(0/0):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int s[10]={}; int q,w=0; for(int i=0;i<5;i++){ cin>>s[i]; } for(int a =0 ;a<5;a++){ if(s[a]>w){ w=s[a]; q=a; } cout<<q+1<<else; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:21:28: error: expected primary-expression before 'else'
                 cout<