Language: C++

#include <iostream> 
#include <string> using namespace std; int ans;
string s;
int main(){
  cin >> s;
  if(s[0]=='7') cout << "Yes" << endl;
  if(s[1]=='7') cout << "Yes" << endl;
  if(s[2]=='7') cout << "Yes" << endl;
  else {
    cout << "No" << endl;
  }
}
  
    


Compiler output:
a.cc:2:19: warning: extra tokens at end of #include directive
    2 | #include <string> using namespace std; int ans;
      |                   ^~~~~
a.cc:3:1: error: 'string' does not name a type; did you mean 'stdin'?
    3 | string s;
      | ^~~~~~
      | stdin
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   cin >> s;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:5:10: error: 's' was not declared in this scope
    5 |   cin >> s;
      |          ^
a.cc:6:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |   if(s[0]=='7') cout << "Yes" << endl;
      |                 ^~~~
      |                 std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:6:34: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    6 |   if(s[0]=='7') cout << "Yes" << endl;
      |                                  ^~~~
      |                                  std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:7:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |   if(s[1]=='7') cout << "Yes" << endl;
      |                 ^~~~
      |                 std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:7:34: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 |   if(s[1]=='7') cout << "Yes" << endl;
      |                                  ^~~~
      |                                  std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:8:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |   if(s[2]=='7') cout << "Yes" << endl;
      |                 ^~~~
      |                 std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:8:34: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 |   if(s[2]=='7') cout << "Yes" << endl;
      |                                  ^~~~
      |                                  std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:10:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |     cout << "No" << endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:10:21: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   10 |     cout << "No" << endl;
      |                     ^~~~
      |                     std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~