Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
82613 陈俊洁 如何得到"hello" C++ Compile Error 0 MS 0 KB 276 2024-07-13 14:20:44

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; char s[1000000]; int sn[150]; int main() { char a[1500]; cin >> a; for (int i=0; i<1500; i++) { if(a[i]==h&&a[i]==e&&a[i]==l&&a[i]==l&&a[i]==o) { cout << "YES"; } else { cout << "NO"; } } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:9:12: error: 'h' was not declared in this scope
   if(a[i]==h&&a[i]==e&&a[i]==l&&a[i]==l&&a[i]==o) {
            ^
Main.cc:9:21: error: 'e' was not declared in this scope
   if(a[i]==h&&a[i]==e&&a[i]==l&&a[i]==l&&a[i]==o) {
                     ^
Main.cc:9:30: error: 'l' was not declared in this scope
   if(a[i]==h&&a[i]==e&&a[i]==l&&a[i]==l&&a[i]==o) {
                              ^
Main.cc:9:48: error: 'o' was not declared in this scope
   if(a[i]==h&&a[i]==e&&a[i]==l&&a[i]==l&&a[i]==o) {
                                                ^