Language: C++

#include <iostream>
int main(){
    int H,W;
    int i=0;
    while(1){
        cin>>H>>W;
        if(H==0&&W==0){
            break;
        }
        for(int n=1;n<=H;n++){
            for(int i=1;i<=W;i++){
                if(n==1){
                    cout<<"#";
                }
                else{
                    if(i==1){
                        cout<<"#";
                    }
                    else{
                        cout<<".";
                    }
                    else if(i==W){
                        cout<<"#";
                    }
                }
                else if(n==H){
                    cout<<"#";
                }
            }
            cout<<endl;
        }
        cout<<endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |         cin>>H>>W;
      |         ^~~
      |         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:13:21: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 |                     cout<<"#";
      |                     ^~~~
      |                     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:17:25: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   17 |                         cout<<"#";
      |                         ^~~~
      |                         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:20:25: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   20 |                         cout<<".";
      |                         ^~~~
      |                         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:22:21: error: 'else' without a previous 'if'
   22 |                     else if(i==W){
      |                     ^~~~
a.cc:23:25: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   23 |                         cout<<"#";
      |                         ^~~~
      |                         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:26:17: error: 'else' without a previous 'if'
   26 |                 else if(n==H){
      |                 ^~~~
a.cc:27:21: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   27 |                     cout<<"#";
      |                     ^~~~
      |                     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:30:13: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   30 |             cout<<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:30:19: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   30 |             cout<<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:32:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   32 |         cout<<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:32:15: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   32 |         cout<<endl;
      |               ^~~~
      |               std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~