Language: C++

#include <iostream>
int main(){
  char[5] N;
  cin>>N;
  if(N>=1000&&N<=9000){
   	if(N[0]==N[1]&&N[1]==N[2]){
      cout<<"Yes"<<endl;
    }
    else if ( s [1]== s [2]&& s [2]== s [3]){
      cout<<"Yes"<<endl;
    }
    else
      cout<<"No"<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:8: error: expected identifier before numeric constant
    3 |   char[5] N;
      |        ^
a.cc:3:8: error: expected ']' before numeric constant
    3 |   char[5] N;
      |        ^
      |        ]
a.cc:3:7: error: structured binding declaration cannot have type 'char'
    3 |   char[5] N;
      |       ^
a.cc:3:7: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:3:7: error: empty structured binding declaration
a.cc:3:11: error: expected initializer before 'N'
    3 |   char[5] N;
      |           ^
a.cc:4:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |   cin>>N;
      |   ^~~
      |   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:4:8: error: 'N' was not declared in this scope
    4 |   cin>>N;
      |        ^
a.cc:7:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    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:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    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:9:15: error: 's' was not declared in this scope
    9 |     else if ( s [1]== s [2]&& s [2]== s [3]){
      |               ^
a.cc:10:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |       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:10:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   10 |       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:13:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 |       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:13:19: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   13 |       cout<<"No"<<endl;
      |                   ^~~~
      |                   std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~