Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
6282 | 黄言岐 | 如何得到"hello" | C++ | Compile Error | 0 MS | 0 KB | 619 | 2025-01-16 15:32:16 |
#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(){ char n[1501]; cin>>n; int j; for(int i=0;i<n;i++){ if(n[i]=='h'){ j++; } if(n[i]=='o'){ j++; } if(n[i]=='l'){ j++; } if(n[i]=='e'){ j++; } } if(j==4) cout<<"yes"<<endl; else cout<<"no"<<endl; return 0; }
Main.cc: In function 'int main()': Main.cc:11:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] for(int i=0;i<n;i++){ ^