Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
100650 | 郝王骏程 | 如何得到"hello" | C++ | Compile Error | 0 MS | 0 KB | 392 | 2024-12-09 20:00:28 |
#include<iostream> // cin\cout\endl #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() using namespace std; int main(){ char a[1500],; cin>>a; int s=0,c=strlen(a); for(int i=0;i<=c;i++){ if(a[i]=='h'&&a[i]=='e'&&a[i]=='l'&&a[i]=='o') s+=1 } if(s>=5){ cout<<"YES" else cout<<"NO"; } return 0; }
Main.cc: In function 'int main()': Main.cc:5:18: error: expected unqualified-id before ';' token char a[1500],; ^ Main.cc:11:5: error: expected ';' before '}' token } ^ Main.cc:14:9: error: expected ';' before 'else' else cout<<"NO"; ^