Algorithm
Code Examples
#1 Code Example with C++ Programming
Code -
C++ Programming
#include<bits/stdc++.h>
using namespace std;
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
string s;
cin>>s;
for(auto i:s){
if(i == 'H' || i == 'Q' || i == '9'){
cout<<"YES\n";
return 0;
}
}
cout<<"NO\n";
return 0;
}
Copy The Code &
Try With Live Editor
Input
Hi!
Output
YES
Demonstration
Codeforcess solution 133-A A. HQ9+ ,C++, Java, Js and Python,133-A,Codeforcess solution