criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include <iostream>
#include <string>
using namespace std;

int main()
{
    while (true) {
        int h, w;
        cin >> h >> w;
        
        if (!h && !w) break;
        
        string s1(w, '#');
        
        string s2(w, ' ');
        s2[0] = '#';
        s2[s.size() - 1] = '#';
        
        cout << s1;
        for (int i = 1; i < h - 1; i++)
            cout << s2 << "\n";
        cout << s1;
            
        cout << "\n";
    }
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:12: error: 's' was not declared in this scope; did you mean 's2'?
   17 |         s2[s.size() - 1] = '#';
      |            ^
      |            s2
Language: C++

loop {
h, w = gets.split.map &:to_i
break if h == 0
(1..h).map {|i|
  (1..w).map {|j|
    print i == 1 || i == h || j == 1 || j == w ? ?# : ?.
  }
  puts
}
puts
}

Compiler output:
a.cc:4:2: error: too many decimal points in number
    4 | (1..h).map {|i|
      |  ^~~~
a.cc:5:4: error: too many decimal points in number
    5 |   (1..w).map {|j|
      |    ^~~~
a.cc:6:51: error: stray '#' in program
    6 |     print i == 1 || i == h || j == 1 || j == w ? ?# : ?.
      |                                                   ^
a.cc:1:1: error: 'loop' does not name a type
    1 | loop {
      | ^~~~
Language: C++

#include <iostream>
using namespace std;

int main()
{
  int H,W;
  whike(1){
    cin >>H>>W;

    if(H==0 && W==0){break;}

    for(int i=0;i<H;i++){
      for(int j=0;j<W;j++){
        if(i==0 || i=h-1){cout<<"#";}
        else if(j==0 || j==w-1){cout<<"#";}
        else{cout<<".";}
      }
      cout<<endl;
    }
    cout<<endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'whike' was not declared in this scope
    7 |   whike(1){
      |   ^~~~~
Language: C++

#include <iostream>
using namespace std;

int main()
{
  int H,W;
  while(1){
    cin >>H>>W;

    if(H==0 && W==0){break;}

    for(int i=0;i<H;i++){
      for(int j=0;j<W;j++){
        if(i==0 || i=h-1){cout<<"#";}
        else if(j==0 || j==w-1){cout<<"#";}
        else{cout<<".";}
      }
      cout<<endl;
    }
    cout<<endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:22: error: 'h' was not declared in this scope
   14 |         if(i==0 || i=h-1){cout<<"#";}
      |                      ^
a.cc:15:28: error: 'w' was not declared in this scope
   15 |         else if(j==0 || j==w-1){cout<<"#";}
      |                            ^
Language: C++

#include <iostream>
using namespace std;

int main()
{
  int H,W;
  while(1){
    cin >>H>>W;

    if(H==0 && W==0){break;}

    for(int i=0;i<H;i++){
      for(int j=0;j<W;j++){
        if(i==0 || i=H-1){cout<<"#";}
        else if(j==0 || j==W-1){cout<<"#";}
        else{cout<<".";}
      }
      cout<<endl;
    }
    cout<<endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:17: error: lvalue required as left operand of assignment
   14 |         if(i==0 || i=H-1){cout<<"#";}
      |            ~~~~~^~~~
Language: C++

#import <iostream>
 
int main() {
  using namespace std;

  while ( true ) {
    int H = 0;
    int W = 0;
    cin >> H >> W;
    if ( H == 0 && W == 0 ) break;

    PrintArea(H, W);
  }
  return 0;
}

void PrintWallLine(int length) {
  using namespace std;

  for ( int i = 0; i < length; ++i ) {
    cout << '#';
  }
  cout << endl;
}

void PrintRoomLine(int length) {
  using namespace std;

  for ( int i = 0; i < length; ++i ) {
    if ( i == 0 || i == length - 1) {
      cout << '#';
    } else {
      cout << '.';
    }
  }
  cout << endl;
}

void PrintArea(int H, int W) {
  using namespace std;

  for ( int i = 0; i < H; ++i ) {
    if ( i == 0 || i == H-1) { 
      PrintWallLine( W );
    } else {
      PrintRoomLine( W );
    }
  }
  cout << endl;
}

Compiler output:
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    1 | #import <iostream>
      |  ^~~~~~
a.cc: In function 'int main()':
a.cc:12:5: error: 'PrintArea' was not declared in this scope
   12 |     PrintArea(H, W);
      |     ^~~~~~~~~
Language: C++

#include <iostream>
  
int main() {
  using namespace std;
 
  while ( true ) {
    int H = 0;
    int W = 0;
    cin >> H >> W;
    if ( H == 0 && W == 0 ) break;
 
    PrintArea(H, W);
  }
  return 0;
}
 
void PrintWallLine(int length) {
  using namespace std;
 
  for ( int i = 0; i < length; ++i ) {
    cout << '#';
  }
  cout << endl;
}
 
void PrintRoomLine(int length) {
  using namespace std;
 
  for ( int i = 0; i < length; ++i ) {
    if ( i == 0 || i == length - 1) {
      cout << '#';
    } else {
      cout << '.';
    }
  }
  cout << endl;
}
 
void PrintArea(int H, int W) {
  using namespace std;
 
  for ( int i = 0; i < H; ++i ) {
    if ( i == 0 || i == H-1) { 
      PrintWallLine( W );
    } else {
      PrintRoomLine( W );
    }
  }
  cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: 'PrintArea' was not declared in this scope
   12 |     PrintArea(H, W);
      |     ^~~~~~~~~
Language: C++

#include <iostream>

void PrintWallLine(int length) {
  using namespace std;
  
  for ( int i = 0; i < length; ++i ) {
    cout << '#';
  }
  cout << endl;
}
  
void PrintRoomLine(int length) {
  using namespace std;
  
  for ( int i = 0; i < length; ++i ) {
    if ( i == 0 || i == length - 1) {
      cout << '#';
    } else {
      cout << '.';
    }
  }
  cout << endl;
}
    
int main() {
  using namespace std;
  
  while ( true ) {
    int H = 0;
    int W = 0;
    cin >> H >> W;
    if ( H == 0 && W == 0 ) break;
  
    PrintArea(H, W);
  }
  return 0;
}
  
void PrintArea(int H, int W) {
  using namespace std;
  
  for ( int i = 0; i < H; ++i ) {
    if ( i == 0 || i == H-1) { 
      PrintWallLine( W );
    } else {
      PrintRoomLine( W );
    }
  }
  cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:5: error: 'PrintArea' was not declared in this scope
   34 |     PrintArea(H, W);
      |     ^~~~~~~~~
Language: C++

#include <iostream>

void PrintWallLine( int length ) {
  using namespace std;
  for ( int i = 0; i < length; ++i ) {
    cout << '#';
  }
  cout << endl;
}

void PrintRoomLine( int length ) {
  using namespace std;

  for ( int i = 0; i < length; ++i ) {
    if ( i == 0 || i == length - 1 ) }
      cout << '#';
    } else {
      cout << '.';
    }
  }
  cout << endl;
}

void PrintArea ( int H, int W ) {
  using namespace std;

  for ( int i = 0; i < H; ++i ) {
    if ( int i = 0; i < H; ++i ) {
      PrintWallLine( W );
    } else {
      PrintRoomLine( W );
    }
  }
  cout << endl;
} 

int main() {
  using namespace std;

  while ( true ) {
    int H = 0;
    int W = 0;
    cin >> H >> W;

    if ( H == 0 && W == 0 ) { break; }

    PrintArea( H, W );

  }
  return 0;
}

Compiler output:
a.cc: In function 'void PrintRoomLine(int)':
a.cc:15:38: error: expected primary-expression before '}' token
   15 |     if ( i == 0 || i == length - 1 ) }
      |                                      ^
a.cc: At global scope:
a.cc:17:7: error: expected unqualified-id before 'else'
   17 |     } else {
      |       ^~~~
a.cc:20:3: error: expected declaration before '}' token
   20 |   }
      |   ^
a.cc:21:3: error: 'cout' does not name a type
   21 |   cout << endl;
      |   ^~~~
a.cc:22:1: error: expected declaration before '}' token
   22 | }
      | ^
a.cc: In function 'void PrintArea(int, int)':
a.cc:28:26: error: expected ')' before ';' token
   28 |     if ( int i = 0; i < H; ++i ) {
      |        ~                 ^
      |                          )
a.cc:28:31: error: expected ';' before ')' token
   28 |     if ( int i = 0; i < H; ++i ) {
      |                               ^~
      |                               ;
a.cc:30:7: error: 'else' without a previous 'if'
   30 |     } else {
      |       ^~~~
Language: C++

#include <iostream>
 
void PrintWallLine( int length ) {
  using namespace std;
  for ( int i = 0; i < length; ++i ) {
    cout << '#';
  }
  cout << endl;
}
 
void PrintRoomLine( int length ) {
  using namespace std;
 
  for ( int i = 0; i < length; ++i ) {
    if ( i == 0 || i == length - 1 ) {
      cout << '#';
    } else {
      cout << '.';
    }
  }
  cout << endl;
}
 
void PrintArea ( int H, int W ) {
  using namespace std;
 
  for ( int i = 0; i < H; ++i ) {
    if ( int i = 0; i < H; ++i ) {
      PrintWallLine( W );
    } else {
      PrintRoomLine( W );
    }
  }
  cout << endl;
} 
 
int main() {
  using namespace std;
 
  while ( true ) {
    int H = 0;
    int W = 0;
    cin >> H >> W;
 
    if ( H == 0 && W == 0 ) { break; }
 
    PrintArea( H, W );
 
  }
  return 0;
}

Compiler output:
a.cc: In function 'void PrintArea(int, int)':
a.cc:28:26: error: expected ')' before ';' token
   28 |     if ( int i = 0; i < H; ++i ) {
      |        ~                 ^
      |                          )
a.cc:28:31: error: expected ';' before ')' token
   28 |     if ( int i = 0; i < H; ++i ) {
      |                               ^~
      |                               ;
a.cc:30:7: error: 'else' without a previous 'if'
   30 |     } else {
      |       ^~~~
Language: C++

#include <iostream>
using namespace std;

void frm(int W, int H){
  for (int i = 0; i < H; i++) {
    if(i = 0 || i = H -1){
      for (int j = 0; j < W; j++) cout << "#";
      cout << endl;
    }else{
      cout << "#";
      for(int j = 1; j < W-1; j++) cout << " ";
      cout << "#" << endl;      
    }
  }
  cout << endl;
}

int main(){
  int H,W;

  while(1){
    cin >> H >> W;
    frm(H, W);
  }
}

Compiler output:
a.cc: In function 'void frm(int, int)':
a.cc:6:14: error: lvalue required as left operand of assignment
    6 |     if(i = 0 || i = H -1){
      |            ~~^~~~
Language: C++

#include <iostream>
using namespace std;

void frm(int W, int H){
  for (int i = 0; i < H; i++) {
    if(i = 0 || i = H - 1){
      for (int j = 0; j < W; j++) cout << "#";
      cout << endl;
    }else{
      cout << "#";
      for(int j = 1; j < W-1; j++) cout << " ";
      cout << "#" << endl;      
    }
  }
  cout << endl;
}

int main(){
  int H,W;

  while(1){
    cin >> H >> W;
    frm(H, W);
  }
}

Compiler output:
a.cc: In function 'void frm(int, int)':
a.cc:6:14: error: lvalue required as left operand of assignment
    6 |     if(i = 0 || i = H - 1){
      |            ~~^~~~
Language: C++

#include <iostream>
using namespace std;

void frm(int W, int H){
  for (int i = 0; i < H; i++) {
      for(int j = 0; j < W; j++) {
        if (i == 0 || i == W-1 || j = 0 || j = W -1){
          cout << '#';
        }else{
          cout << '.';
        } 
      }   
  cout << endl;   
  }
}

int main(){
  int H,W;

  while(1){
    cin >> H >> W;
    if(H == 0 && W == 0) return 0;
    
    frm(H, W);
    cout << endl;
  }
    
}

Compiler output:
a.cc: In function 'void frm(int, int)':
a.cc:7:41: error: lvalue required as left operand of assignment
    7 |         if (i == 0 || i == W-1 || j = 0 || j = W -1){
      |                                       ~~^~~~
Language: C++

#include <iostream>
using namespace std;

void frm(int W, int H){
  for (int i = 0; i < H; i++) {
      for(int j = 0; j < W; j++) {
        if (i == 0 || i == W-1 || j == 0 || j == W - 1){
          cout << '#';
        }else{
          cout << '.';
        } 
      } 
      cout << endl;     
  }
}

int main(){
  int H,W;

  while(1){
    cin >> H >> W;
    if(H == 0 && W == 0) return 0;
    
    frm(H, W);
    cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:2: error: expected '}' at end of input
   26 | }
      |  ^
a.cc:17:11: note: to match this '{'
   17 | int main(){
      |           ^
Language: C++

int main()
{
	int h,w;

	while(1){
		cin>>h>>w;

		if(h==0)
			break;

		else{
			for(int i=1; i<=w; i++)
				cout<<'#';
			cout<<endl;
			for(int i=1; i<=h-2; i++){
				cout<<'#';
				for(int j=1; j<=w-2; j++)
					cout<<'.';
				cout<<'#';
				cout<<endl;
			}
			for(int i=1; i<=w; i++)
				cout<<'#';
			cout<<endl;
			cout<<endl;
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:17: error: 'cin' was not declared in this scope
    6 |                 cin>>h>>w;
      |                 ^~~
a.cc:13:33: error: 'cout' was not declared in this scope
   13 |                                 cout<<'#';
      |                                 ^~~~
a.cc:14:25: error: 'cout' was not declared in this scope
   14 |                         cout<<endl;
      |                         ^~~~
a.cc:14:31: error: 'endl' was not declared in this scope
   14 |                         cout<<endl;
      |                               ^~~~
Language: C++

#include<iostream>
using namespace std;

int main(){
int H[100000],W[100000];
int c=0;
for(int i=1;i<100000;i++){
cin>>H[i],W[i];
c++;
if(H[i]==0 && W[i]==0){
goto aa;
}
}
aa:
for(int i=1;i<c;i++){
for(int j=0;j<H[i];j++){
for(int k=0;k<W[i];k++){
    if((j==0 || j==(H[i]-1)) && (k==0 || k==(W[i]-1)))
    cout<<"#";
    }
    else{
    cout<<".";
    }
}
cont<<endl;
}
cout<<endl;
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:5: error: 'else' without a previous 'if'
   21 |     else{
      |     ^~~~
a.cc:25:1: error: 'cont' was not declared in this scope; did you mean 'const'?
   25 | cont<<endl;
      | ^~~~
      | const
a.cc: At global scope:
a.cc:29:1: error: expected unqualified-id before 'return'
   29 | return 0;
      | ^~~~~~
a.cc:30:1: error: expected declaration before '}' token
   30 | }
      | ^
Language: C++

#include<iostream>
using namespace std;

int main(){
int H[100000],W[100000];
int c=0;
for(int i=1;i<100000;i++){
cin>>H[i],W[i];
c++;
if(H[i]==0 && W[i]==0){
goto aa;
}
}
aa:
for(int i=1;i<c;i++){
for(int j=0;j<H[i];j++){
for(int k=0;k<W[i];k++){
    if((j==0 || j==(H[i]-1)) && (k==0 || k==(W[i]-1))){
    cout<<"#";
    }
    else{
    cout<<".";
    }
}
cont<<endl;
}
cout<<endl;
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:1: error: 'cont' was not declared in this scope; did you mean 'const'?
   25 | cont<<endl;
      | ^~~~
      | const
Language: C++

#include <string>
#include <vector>
#include <iostream>

using namespace std;

string put_nchar(int n, char c)
{
	string S(n, c);

	return S;
}

void print_rectangle(int H, int W, char c1, char c2)
{
	cout << put_nchar(W, c1);

	for(int i = 1; i < H - 1; i++)
	{
		cout << c1 << put_nchar(W - 2, c2) << c1 << endl;
	}

	cout << put_nchar(W, c1);
}

int main()
{
	vector<int> W, H;

	while(true)
	{
		int H1, W1;

		cin >> H1 >> W1;

		if(H1 == 0 && W1 == 0) { break; }

		H.push_back(H1);
		W.push_back(W1);
	}

	for(vector<int>::size_type i = 0; i < H.size(); i++)
	{
		print_frame(H[i], W[i], '#', '.');

		cout << endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:44:17: error: 'print_frame' was not declared in this scope
   44 |                 print_frame(H[i], W[i], '#', '.');
      |                 ^~~~~~~~~~~
Language: C++

while True:
    w,h = map(int,input().split())
    if w == 0 and h == 0:
        break
    for j in range(h):
        for i in range(w):
            if i == 0 or i == w-1 or j == 0 or j == h-1:
                print('#', end='')
            else:
                print('.', end='')
        print()
    print()

Compiler output:
a.cc:8:32: error: empty character constant
    8 |                 print('#', end='')
      |                                ^~
a.cc:10:32: error: empty character constant
   10 |                 print('.', end='')
      |                                ^~
a.cc:1:1: error: expected unqualified-id before 'while'
    1 | while True:
      | ^~~~~
Language: C++

#include<stdio.h>
int main()
{
int H,W;
int i,j;
int h,w;
for(;;)
{
scanf("%d %d",&H,&W);
if(H<2)
{
h=H-2;
}
if(W<2)
{
w=W-2;
}
for(i=1;i<=H;i++)
{
if(i==1)
{
for(j=1;j<=1;j++)
{
printf("#");
}
printf("\n");
if(i!=1&&i!=H)
{
printf("#");
for(j=1;j<=w;j++)
{
printf(".");
}
printf("#\n");
}
if(i==H)
{
for(j=1;j<=1;j++)
{
printf("#");
}
printf("\n");
}
printf("\n");
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:47:2: error: expected '}' at end of input
   47 | }
      |  ^
a.cc:8:1: note: to match this '{'
    8 | {
      | ^
a.cc:47:2: error: expected '}' at end of input
   47 | }
      |  ^
a.cc:3:1: note: to match this '{'
    3 | {
      | ^
Language: C++

#include<stdio.h>
int main()
{
 int H,W;
 int i,j;
 int h,w;
 for(;;)
 {
  scanf("%d %d",&H,&W);
  if(H<2)
  {
   h=H-2;
  }
  if(W<2)
  {
   w=W-2;
  }
  for(i=1;i<=H;i++)
  {
   if(i==1)
   {
    for(j=1;j<=1;j++)
    {
     printf("#");
    }
    printf("\n");
}
    if(i!=1&&i!=H)
    {
printf("#");
for(j=1;j<=w;j++)
{
printf(".");
}
printf("#\n");
}
if(i==H)
{
for(j=1;j<=1;j++)
{
printf("#");
}
printf("\n");
}
printf("\n");
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:48:2: error: expected '}' at end of input
   48 | }
      |  ^
a.cc:3:1: note: to match this '{'
    3 | {
      | ^
Language: C++

#include <iostream>
using namespace std;

int main(){
	int i, j;
	int H = 0;
	int W = 0;

	while (cin >> H >> W){
		for (i = 0; i < H; i++){
			if (i = 0 || i = H-1){
				for (j = 0; j < W; j++){
					cout << "#";
				}
				cout << "\n";
			}
			else {
				for (j = 0; j < W; j++){
					if (j = 0 || j = W-1){
						cout << "#";
					}
					else {
						cout << ".";
					}
					cout << "\n";
				}
			}
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:35: error: lvalue required as left operand of assignment
   11 |                         if (i = 0 || i = H-1){
      |                                 ~~^~~~
a.cc:19:51: error: lvalue required as left operand of assignment
   19 |                                         if (j = 0 || j = W-1){
      |                                                 ~~^~~~
Language: C++

#include <iostream>
using namespace std;

int main(){
	int i, j;
	int H = 0;
	int W = 0;

	while (cin >> H >> W){
		if (a == 0 && b == 0){
			break;
		}
		for (i = 0; i < H; i++){
			if (i == 0 || i == H-1){
				for (j = 0; j < W; j++){
					cout << "#";
				}
				cout << "\n";
			}
			else {
				for (j = 0; j < W; j++){
					if (j == 0 || j == W-1){
						cout << "#";
					}
					else {
						cout << ".";
					}
					cout << "\n";
				}
			}
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:21: error: 'a' was not declared in this scope
   10 |                 if (a == 0 && b == 0){
      |                     ^
a.cc:10:31: error: 'b' was not declared in this scope
   10 |                 if (a == 0 && b == 0){
      |                               ^
Language: C++

#include <cstdio>
#include <cstring>
int main(){
 char ss[101];
 int h,w,i,j;
 while(true){
  scanf("%d %d",&h,&w);
  if((h==0)&&(w==0)) break;
  strcpy(ss,"#");
  for(i=0;i<w-2;i++)    strcat(ss,".");
  strcat(ss,"#\n");
  for(i=0;i<w;i++) printf("#");
  printf("\n");
  for(i=0;i<h-2;i++) printf(ss);
  printf(i=0;i<w;i++) printf("#");
  printf("\n");
 }
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:13: error: expected ')' before ';' token
   15 |   printf(i=0;i<w;i++) printf("#");
      |         ~   ^
      |             )
a.cc:15:21: error: expected ';' before ')' token
   15 |   printf(i=0;i<w;i++) printf("#");
      |                     ^
      |                     ;
Language: C++

#include <iostream>
#include <iomanip>
using namespace std;
 
int main(){
    int H=0,W=0;
    int i,k;

while(1){    



    cin >> H >> W;
	if(H==0&&W==0){
		break;
	}
    
    for(k=0;k<H;k++){
    	for(i=0;i<W;i++){
    		if((i==0||i==W)||(k==0||k==H)){
    		cout << "#";
    		}else{
    			cout << ".";
    		}
    	}
		}
		cout << endl;
    }





    cout << endl;
}

return 0;
}

Compiler output:
a.cc:37:1: error: expected unqualified-id before 'return'
   37 | return 0;
      | ^~~~~~
a.cc:38:1: error: expected declaration before '}' token
   38 | }
      | ^
Language: C++

#include<iostream>
using namespace std;

int main(){
	int a=1,b=1,i,l;
	while((cin>>a>>b)&&(a!=0||b!=0)){
		if(a>=3&&b<=100){
			for(l=1;l<=b;l++){
				cout<<"#"<<endl;
			}
			for(i=2;i<a;i++){
			cout<<"#";
				for(l=2;l<b;l++){
				cout<<".";
				}
			cout<<"#"<<endl;
			}
			for(l=1;l<=b;l++){
				cout<<"#"<<endl;
			}
		}
		cout <<endl;
		}
	}
}

Compiler output:
a.cc:25:1: error: expected declaration before '}' token
   25 | }
      | ^
Language: C++

while True:
   H, W = map(int, raw_input().split())
 
   if (H == 0 and W == 0): 
    break
   for i in range(H):
    if(i==0):
     print "#"*W
    elif(i==H-1):
     print "#"*W
    else:
     print "#"
     print "."*(W-2)
     print "#"

   print ""

Compiler output:
a.cc:1:1: error: expected unqualified-id before 'while'
    1 | while True:
      | ^~~~~
Language: C++

while 1:
  H, W = map(int, raw_input().split())
  if H == 0 and W == 0:
    break
  for i in range(h):
    print "#" 
    print "." * W-2
    print "#"
  print""

Compiler output:
a.cc:1:1: error: expected unqualified-id before 'while'
    1 | while 1:
      | ^~~~~
Language: C++

#include <iostream>
using namespace std;

int main() {
	int H, W;
while(1){
cin>>H>>W;
if(H==0&&W==0) break;
for(int i=0; i<H; i++){
for(int j=0; j<W; j++){
if(i==0||i==H-1||j==0||j==W-1){
cout<<"#";

}else{cout<<".";}

}
cot<<"\n";
}
cout<<endl;
}

// your code goes here
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:1: error: 'cot' was not declared in this scope
   17 | cot<<"\n";
      | ^~~
Language: C++

#include<iostream>
#include<cstdio>
using namespace std;
#define MAX 300

int main(void)
{
  int H,W;
  while(1){
    
    cin >> H >> W;
    if(H == 0 && W == 0) break;

    for(int i = 0;i < H;i++){
      for(int j = 0;j < W;j++){
        printf("#");
      }
      printf("\n");
      for(int k = 0;k < H - 2;k++){
        printf("#");
        for(int l = 0;l < W - 2;l++){
          printf(".");
        }
        printf("#\n");
    }
    for(int j = 0;j < W;j++){
      printf("#");
    }
    printf("\n");
  }
  printf("\n");
  return 0; 
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:33:2: error: expected '}' at end of input
   33 | }
      |  ^
a.cc:7:1: note: to match this '{'
    7 | {
      | ^
Language: C++

import java.util.Scanner;

class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int H, W;

		while (true) {
			H = scanner.nextInt();
			W = scanner.nextInt();

			if (H == 0 && W == 0)
				break;

			for (int i = 0; i < H; i++) {
				if (i == 0 || i == H - 1) {
					for (int i2 = 0; i2 < W; i2++) {
						System.out.print("#");
					}
				} else {
					for (int i2 = 0; i2 < W; i2++) {
						if (i2 == 0 || i2 == W - 1) {
							System.out.print("#");
						} else {
							System.out.print(".");
						}
					}
				}

				System.out.println();
			}

			System.out.println();
		}
	}
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:15: error: expected ':' before 'static'
    4 |         public static void main(String[] args) {
      |               ^~~~~~~
      |               :
a.cc:4:33: error: 'String' has not been declared
    4 |         public static void main(String[] args) {
      |                                 ^~~~~~
a.cc:4:42: error: expected ',' or '...' before 'args'
    4 |         public static void main(String[] args) {
      |                                          ^~~~
a.cc:36:2: error: expected ';' after class definition
   36 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:5:17: error: 'Scanner' was not declared in this scope
    5 |                 Scanner scanner = new Scanner(System.in);
      |                 ^~~~~~~
a.cc:9:29: error: 'scanner' was not declared in this scope
    9 |                         H = scanner.nextInt();
      |                             ^~~~~~~
a.cc:18:49: error: 'System' was not declared in this scope
   18 |                                                 System.out.print("#");
      |                                                 ^~~~~~
a.cc:23:57: error: 'System' was not declared in this scope
   23 |                                                         System.out.print("#");
      |                                                         ^~~~~~
a.cc:25:57: error: 'System' was not declared in this scope
   25 |                                                         System.out.print(".");
      |                                                         ^~~~~~
a.cc:30:33: error: 'System' was not declared in this scope
   30 |                                 System.out.println();
      |                                 ^~~~~~
a.cc:33:25: error: 'System' was not declared in this scope
   33 |                         System.out.println();
      |                         ^~~~~~
Language: C++

#include<iostream>
using namespace std;

int main()
{
    int H, W;
    int i, j;

    do{
        cin >> H >> W;
        if((H == 0) && (W == 0)) break;

        for(i = 0; i < H; i++){
            for(j = 0; j < W; j++){
                if((i == 0) || (i == H - 1)){
                    cout << "#";
                }else if((j == 0) || (j == W - 1)){
                    cout << "#";
                }else{
                    cout << ".";
            }
            cout << endl;
        }
		cout << endl;

    }while(1);

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:2: error: expected 'while' at end of input
   29 | }
      |  ^
a.cc:29:2: error: expected '(' at end of input
   29 | }
      |  ^
      |  (
a.cc:29:2: error: expected primary-expression at end of input
a.cc:29:2: error: expected ')' at end of input
   29 | }
      |  ^
      |  )
a.cc:29:2: error: expected ';' at end of input
   29 | }
      |  ^
      |  ;
a.cc:29:2: error: expected '}' at end of input
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

while(True):
    h, w = map(int, input().split())
    if w == 0 and h == 0:
        break

    print('#' * w)
    for i in range(0, h - 2):
        print('#' + '.' * (w - 2) + '#')
    print('#' * w)
    print()

Compiler output:
a.cc:1:1: error: expected unqualified-id before 'while'
    1 | while(True):
      | ^~~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
	
	int H,W;
	while (true){
	cin>>H>>W;
	if(H==0 && W==0)break;
	for(int i =0; i<H;i++){
	for(int j==0;j<W;j++){
	if(i==0||i==H-1||j==0||j==W-1){
	cout<<"#";
	}
	cout<<endl;
	}
	}
	cout<<endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:18: error: expected ';' before '==' token
   10 |         for(int j==0;j<W;j++){
      |                  ^~
      |                  ;
a.cc:10:18: error: expected primary-expression before '==' token
   10 |         for(int j==0;j<W;j++){
      |                  ^~
a.cc:10:25: error: expected ')' before ';' token
   10 |         for(int j==0;j<W;j++){
      |            ~            ^
      |                         )
a.cc:10:26: error: 'j' was not declared in this scope
   10 |         for(int j==0;j<W;j++){
      |                          ^
Language: C++

???include<iostream>
using namespace std;


int main(){

	int W,H,i,j;

	for (;;){
		cin>>H>>W;
		if(W==0&&H==0)
			break;

		for(i=0;i<H;i++){
			for(j=o;j<W;j++){
				if(i==0||i==H-1){
					cout<<"#";
               }
				else{
					if(j==0||j==W-1){
						cout<<"#";
					}
					else{cout<<".";}
				}
			}cout endl;
		}cout endl;
		
	}

return 0;
}

Compiler output:
a.cc:1:1: error: expected unqualified-id before '?' token
    1 | ???include<iostream>
      | ^
a.cc: In function 'int main()':
a.cc:10:17: error: 'cin' was not declared in this scope
   10 |                 cin>>H>>W;
      |                 ^~~
a.cc:15:31: error: 'o' was not declared in this scope
   15 |                         for(j=o;j<W;j++){
      |                               ^
a.cc:17:41: error: 'cout' was not declared in this scope
   17 |                                         cout<<"#";
      |                                         ^~~~
a.cc:21:49: error: 'cout' was not declared in this scope
   21 |                                                 cout<<"#";
      |                                                 ^~~~
a.cc:23:46: error: 'cout' was not declared in this scope
   23 |                                         else{cout<<".";}
      |                                              ^~~~
a.cc:25:26: error: 'cout' was not declared in this scope
   25 |                         }cout endl;
      |                          ^~~~
a.cc:26:18: error: 'cout' was not declared in this scope
   26 |                 }cout endl;
      |                  ^~~~
Language: C++

#include <stdio.h>

int main(){

  int H,W,i,j,x;
  for(x=1;x<=300;x++;){
      scanf("%d%d",&H,&W);
      for(i=1;i<=H;i++){
	for(j=1;j<=W;j++){
	  if(i==1||j==1||j==W||i==H){
	    printf("#");
	  }else{
	    printf(".");
	  }
	}
	  printf("\n");
      }
    }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:21: error: expected ')' before ';' token
    6 |   for(x=1;x<=300;x++;){
      |      ~              ^
      |                     )
a.cc:6:22: error: expected primary-expression before ')' token
    6 |   for(x=1;x<=300;x++;){
      |                      ^
Language: C++

#include <stdio.h>

int main(){

  int H,W,i,j,x;
  for(x=1;x<=300;x++;){
      scanf("%d%d",&H,&W);
      if(H==0&&W==0) break;
      for(i=1;i<=H;i++){
	for(j=1;j<=W;j++){
	  if(i==1||j==1||j==W||i==H){
	    printf("#");
	  }else{
	    printf(".");
	  }
	}
	  printf("\n");
      }
    }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:21: error: expected ')' before ';' token
    6 |   for(x=1;x<=300;x++;){
      |      ~              ^
      |                     )
a.cc:6:22: error: expected primary-expression before ')' token
    6 |   for(x=1;x<=300;x++;){
      |                      ^
Language: C++

#include<iostream>
using namespace std;
int main(){
  int i,j,H,W;
  while(true){
    cin >> H >> W;
    if(H==0 && W==0)break;
    for(i=1;i<=H;i++){
      if(i==1 || i==H){
        for(j=1;j<=W;j++){
          cout << "#";
        }
      }else{
        for(k=1;k<=W;k++){
          if(k==1 || k==W){
            cout << "#";
          }else{
            cout << ".";
          }
        }
      }
      cout << endl;
    }
  cout << endl;
  endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:13: error: 'k' was not declared in this scope
   14 |         for(k=1;k<=W;k++){
      |             ^
a.cc:25:7: error: statement cannot resolve address of overloaded function
   25 |   endl;
      |       ^
a.cc:26:2: error: expected '}' at end of input
   26 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include<iostream>
using namespace std;
int main(){
  int i,j,k,H,W;
  while(true){
    cin >> H >> W;
    if(H==0 && W==0)break;
    for(i=1;i<=H;i++){
      if(i==1 || i==H){
        for(j=1;j<=W;j++){
          cout << "#";
        }
      }else{
        for(k=1;k<=W;k++){
          if(k==1 || k==W){
            cout << "#";
          }else{
            cout << ".";
          }
        }
      }
      cout << endl;
    }
  cout << endl;
  << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:3: error: expected primary-expression before '<<' token
   25 |   << endl;
      |   ^~
Language: C++

#include <iostream>
using namespace std;
  
int main()
{
	int H, W, i, j;
	while(1){
    cin >> H >> W;
		if ( W == 0 & H == 0)
			break;
		for (i=0; i<H; i++) {
			for(j=0; j<W; j++) {
				if(0 < j && j< W-1 && 0 < i && i < H-1)
				cout <<'.';
			}else{
				cout << '#'
			}
			cout << endl;
		}
		cout << endl;
	}
	return 0;
}
	

Compiler output:
a.cc: In function 'int main()':
a.cc:15:26: error: 'else' without a previous 'if'
   15 |                         }else{
      |                          ^~~~
a.cc:16:44: error: expected ';' before '}' token
   16 |                                 cout << '#'
      |                                            ^
      |                                            ;
   17 |                         }
      |                         ~
Language: C++

#include <iostream>
using namespace std;
  
int main()
{
	int H, W, i, j;
	while(1){
    cin >> H >> W;
		if ( W == 0 & H == 0)
			break;
		for (i=0; i<H; i++) {
			for(j=0; j<W; j++) {
				if(0 < j && j< W-1 && 0 < i && i < H-1){
				cout <<'.';
			}else {
				cout << '#';
			}
			cout << endl;
		}
		cout << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:2: error: expected '}' at end of input
   23 | }
      |  ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

while True:
    H, W = [int(i) for i in input().split()]
    if H ==  W == 0:
         break

    for h in rage(H):
         for w in range(W):
             if h == 0 or h == H - 1 or w == 0 or w == W - 1:
                 print('#', end='')
             else:
                 print('.', end='')

         print()
    
     print()

Compiler output:
a.cc:9:33: error: empty character constant
    9 |                  print('#', end='')
      |                                 ^~
a.cc:11:33: error: empty character constant
   11 |                  print('.', end='')
      |                                 ^~
a.cc:1:1: error: expected unqualified-id before 'while'
    1 | while True:
      | ^~~~~
Language: C++

#include<iostream>
using namespace std;
int main(){

	int w,h;
	cin>>h>>w;
	if(h==0 && w==0){
		break;
	}
	for(int i=0;i<h;i++){
		for(int j=0;j<w;j++){
			cout<<"#";
		}
		cout<<endl;
	}
	return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: break statement not within loop or switch
    8 |                 break;
      |                 ^~~~~
Language: C++

#include <iostream>

#define MAX_SET (1000)

using namespace std;

void draw_frame(int H, int W);

int main()
{  
    int  i;
    int* H = new int[MAX_SET + 1];
    int* W = new int[MAX_SET + 1];
    int  size;

    for (int i = 0; i < MAX_SET + 1; i++) {
         do {
             cin >> H[i] >> W[i];
         } while (H[i] > 300 || W[i] > 300);

         if (H[i] == 0 && W[i] == 0) {	    
             size = i;
	     break;
         }
    }
   
    for (int i = 0; i < size; i++) {
         draw_frame(H[i], W[i]);         
         cout << endl;
    }

    delete[] H;
    delete[] W;
 
    return (0);
} 

void draw_frame(int H, int W)
{    
     for (int i = 1; i <= H; i++) {
          if (i == 1 || i == H) {
              for (j = 1; j <= W; j++) {
	  	   cout << "#";
              }
          } else {
	      for (int j = 1; j <= W; j++) {
		   if (j == 1 || j == W) {
		       cout << "#";
                   } else {
		       cout << ".";
                   }
	      }
          }

          cout << endl;
     }
}

Compiler output:
a.cc: In function 'void draw_frame(int, int)':
a.cc:42:20: error: 'j' was not declared in this scope
   42 |               for (j = 1; j <= W; j++) {
      |                    ^
Language: C++

#include<iostream>
#include<cstdio>
using namespace std;

int main(){
	int H, W, i, j;
	
	while(1){
		cin >> H >> W;
		if (H == 0 && W ==0){
			break;
		}
		for(i = 0; i < H; i++){
			for(j = 0; j < W;j++){
				if(j == 0 || j == W -1 || i == 0 || i == H -1){
				cout << '#';
				}else{
				cout << '#';}
			cout << endl;
		
		}
		cout << endl;
	}
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:2: error: expected '}' at end of input
   25 | }
      |  ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

#include<iostream>
#include<cstdio>
using namespace std;

int main(){
	int H, W, i, j;
	
	while(1){
		cin >> H >> W;
		if (H == 0 && W ==0){
			break;
		}
		for(i = 0; i < H; i++){
			for(j = 0; j < W;j++){
				if(j == 0 || j == W -1 || i == 0 || i == H -1){
				cout << '#';
				}else{
				cout << '.';}
			cout << endl;
		
		}
		cout << endl;
	}
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:2: error: expected '}' at end of input
   25 | }
      |  ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

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

Compiler output:
a.cc:25:1: error: expected declaration before '}' token
   25 | }
      | ^
Language: C++

#include<iostream>
#include<cstdio>
using namespace std;

int main(){
	int H, W, i, j;
	
	while(1){
		cin >> H >> W;
		if (H == 0 && W ==0){
			break;
		}
		for(i = 0; i < H; i++){
			for(j = 0; j < W;j++){
				if(j == 0 || j == W -1 || i == 0 || i == H -1){
				cout << '#';
				}else{
				cout << '.';
			cout << endl;
		
		}
		cout << endl;
	}
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:2: error: expected '}' at end of input
   25 | }
      |  ^
a.cc:8:17: note: to match this '{'
    8 |         while(1){
      |                 ^
a.cc:25:2: error: expected '}' at end of input
   25 | }
      |  ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

#include<iostream>
using namespace std;

int main(){
int H,W;
while(1){
cin>>H>>W;
for(i=0;i<W;i++) cout<<"#";
cout<<endl;
for(i=1;i<H-1;i++){
cout<<"#";
for(i=1;i<W-1;i++) cout<<".";
cout<<"#"<<endl;
}
for(i=0;i<W;i++) cout<<"#";
cout<<endl;
}
cout endl;
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'i' was not declared in this scope
    8 | for(i=0;i<W;i++) cout<<"#";
      |     ^
a.cc:10:5: error: 'i' was not declared in this scope
   10 | for(i=1;i<H-1;i++){
      |     ^
a.cc:15:5: error: 'i' was not declared in this scope
   15 | for(i=0;i<W;i++) cout<<"#";
      |     ^
a.cc:18:5: error: expected ';' before 'endl'
   18 | cout endl;
      |     ^~~~~
      |     ;
a.cc: At global scope:
a.cc:20:1: error: expected declaration before '}' token
   20 | }
      | ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:21: error: expected primary-expression before '%' token
   10 |         if (i != 0 %% i != H - 1 && j != 0 && j != W - 1) {
      |                     ^
a.cc:11:22: error: expected ';' before '}' token
   11 |           cout << "."
      |                      ^
      |                      ;
   12 |         }
      |         ~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:21: error: expected primary-expression before '%' token
   10 |         if (i != 0 %% i != H - 1 && j != 0 && j != W - 1) {
      |                     ^
Language: C++

#include <iostream>
#include <iomanip>
#include <cstdio>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: expected initializer before 'while'
    9 |         while(1){
      |         ^~~~~
Language: C++

#include <iostream>
using namespace std;
int main()
{
	int i,j,h,w;
	while (1){
		cin >> h >> w;
		if(h==0 && w==0)break;
		for (j=0; i<=h i++){
			for(j=0; j<=w; j++){
				if(){
					cout << "." << endl;
				}else {
					cout << "#" << endl;
			}
		}
		cout << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:31: error: expected ';' before 'i'
    9 |                 for (j=0; i<=h i++){
      |                               ^~
      |                               ;
a.cc:11:36: error: expected primary-expression before ')' token
   11 |                                 if(){
      |                                    ^
a.cc:20:2: error: expected '}' at end of input
   20 | }
      |  ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C++

#include<iostream>
#include<cstdio>
using namespace std;
int main(){


 
  int H,W;

  for( ; ; ){

    cin>>H>>W;

    if(H==0&&W==0)break;

    for(int i=0;i<H;i++){
      for(int j=0;j<W;j++){
	if(i>0 && H-1>i && j>0 && W-1>j){
	cout<<".";
      }else{
	cout<<"#";
      }
    }
    
    cout<<endl;
  }

  cout<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:2: error: expected '}' at end of input
   29 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include <iostream>
using namespace std;
int main(void){
	int h,w;
	cin >> h >> w;
	while (h+w){
		cout << endl << endl;
		for (int i=0;i<w;i++) cout << '#';
		cout << endl;
		for (int i=0;i<h-2;i++){
			cout << '#';
			for (int j=0;j<w-2;j++) cout << '.';
			cout << '#' << endl;
		}
		for (int i=0;i<w;i++) cout << '#';
		cout << endl << endl;
		cin >> h >> w;
	}
}
}

Compiler output:
a.cc:20:1: error: expected declaration before '}' token
   20 | }
      | ^
Language: C++

#include<stdio.h>
int main(){
    int H[10000], W[10000];
    int length;
    int i=0, j, k;
    do{
        scanf("%d %d", &H[i], &W[i]);
        i += 1;
    }while(H[i-1]!=0 || W[i-1]!=0);
    length = i;
    for(i=0; i<length-1; i++){
        for(j=0; j<H[i]; j++){
            for(k=0; k<W[i]; k++){
            if(j==0 || j==H[i]-1 || k==0 || k==w[i]-1){}
                printf("#");
            }else{
                printf(".");
        }
            printf("\n");
        }
        printf("\n");
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:48: error: 'w' was not declared in this scope
   14 |             if(j==0 || j==H[i]-1 || k==0 || k==w[i]-1){}
      |                                                ^
a.cc:16:14: error: 'else' without a previous 'if'
   16 |             }else{
      |              ^~~~
Language: C++

#include<stdio.h>
int main(){
    int H[10000], W[10000];
    int length;
    int i=0, j, k;
    do{
        scanf("%d %d", &H[i], &W[i]);
        i += 1;
    }while(H[i-1]!=0 || W[i-1]!=0);
    length = i;
    for(i=0; i<length-1; i++){
        for(j=0; j<H[i]; j++){
            for(k=0; k<W[i]; k++){
            if(j==0 || j==H[i]-1 || k==0 || k==W[i]-1){}
                printf("#");
            }else{
                printf(".");
        }
            printf("\n");
        }
        printf("\n");
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:14: error: 'else' without a previous 'if'
   16 |             }else{
      |              ^~~~
Language: C++

#include<stdio.h>
int main(){
    int H[10000], W[10000];
    int length;
    int i=0, j, k;
    do{
        scanf("%d %d", &H[i], &W[i]);
        i += 1;
    }while(H[i-1]!=0 || W[i-1]!=0);
    length = i;
    for(i=0; i<length-1; i++){
        for(j=0; j<H[i]; j++){
            for(k=0; k<W[i]; k++){
            if(j==0 || j==H[i]-1 || k==0 || k==W[i]-1){
                printf("#");
            }else{
                printf(".");
            }
            printf("\n");
        }
        printf("\n");
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:2: error: expected '}' at end of input
   24 | }
      |  ^
a.cc:2:11: note: to match this '{'
    2 | int main(){
      |           ^
Language: C++

#include <stdio.h>
int main(void){
while(1){
    int h,w;
    scanf("%d%d",&h,&w);
    if(h==0&&w==0)
    break;
    
    int i,j;
    
 
    
    for(i=0;i<h;i++){
        for(j=0;j<w;j++){
            if(i!=0&&i!=h-1&&j!=0&&j!=w-1)
            printf(".");
            else
            printf("#");
        }
       printf("\n");
    }
   
    printf("\n");
}
return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:25:10: error: expected '}' at end of input
   25 | return 0;
      |          ^
a.cc:2:15: note: to match this '{'
    2 | int main(void){
      |               ^
Language: C++

#include<iostream>
using namespace std;
int main(){
	int a, b;
	do{
		cin >> a >> b;
		if (a == 0 || b == 0)
			break;
		for (int i = 0; i < a; i++){
			for (int j = 0; j < b; j++){
				if (i == 0 || j == 0 || i == a-1 || j == b-1)
					cout << "#";
				else
					cout << ".";
			}
			cout << endl;
		}
	} while (true);
        cout<<endl
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:19: error: expected ';' before 'return'
   19 |         cout<<endl
      |                   ^
      |                   ;
   20 |         return 0;
      |         ~~~~~~
Language: C++

#include <iostream>
using namespace std;
int main(){
int H,W;

for (;;){
    if (H = 0&&W == 0)break;
    for (int a = 0;a <= W;a++){
        if (W == 0||H == 0)break;
        cout << a;
    } 
    cour << endl;

    for (int b = 0;b <= H - 2;b++)
        if (W = 0 || H == 0)break;
        cout << ".";
    }

    for (int a = 0;a <= W;a++){
        if (W == 0|| H == 0)break;
        cout << a;
    }
    cout << endl;

    return 0

}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: 'cour' was not declared in this scope
   12 |     cour << endl;
      |     ^~~~
a.cc:25:13: error: expected ';' before '}' token
   25 |     return 0
      |             ^
      |             ;
   26 | 
   27 | }
      | ~
Language: C++

#include <iostream>
using namespace std;
int main(){
int H,W;

for (;;){
    if (H == 0&&W == 0)break;
    for (int a = 0;a <= W;a++){
        if (W == 0||H == 0)break;
        cout << a;
    } 
    cour << endl;

    for (int b = 0;b <= H - 2;b++)
        if (W == 0 || H == 0)break;
        cout << ".";
    }

    for (int a = 0;a <= W;a++){
        if (W == 0|| H == 0)break;
        cout << a;
    }
    cout

    return 0

}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: 'cour' was not declared in this scope
   12 |     cour << endl;
      |     ^~~~
a.cc:23:9: error: expected ';' before 'return'
   23 |     cout
      |         ^
      |         ;
   24 | 
   25 |     return 0
      |     ~~~~~~
Language: C++

#include <iostream>
using namespace std;

int main()
{
int i,j,k,W,H;
while(1)
 {
cin >> H >> W;
if(H==0||W==0) break;
for(j=0;j<H;j++)
  {
for(k=0;k<W;k++)
   {
if(j=0||j=H-1||k=0||k=W-1)
cout << "#";
else 
cout << ".";
   }
cout << endl;
  }
cout << endl;
 }
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:19: error: lvalue required as left operand of assignment
   15 | if(j=0||j=H-1||k=0||k=W-1)
      |                  ~^~~
Language: C++

#include <iostream>
using namespace std;

int main()
{
int i,j,k,W,H;
while(1)
 {
cin >> H >> W;
if(H==0||W==0) break;
for(j=0;j<H;j++)
  {
for(k=0;k<W;k++)
   {
if(j=0 || j=H-1 || k=0 || k=W-1)
cout << "#";
else 
cout << ".";
   }
cout << endl;
  }
cout << endl;
 }
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:24: error: lvalue required as left operand of assignment
   15 | if(j=0 || j=H-1 || k=0 || k=W-1)
      |                      ~~^~~~
Language: C++

#include <iostream>
using namespace std;

int main()
{
int i,j,k,W,H;
while(1)
 {
cin >> H >> W;
if(H==0||W==0) break;
for(j=0;j<H;j++)
  {
for(k=0;k<W;k++)
   {
    if( j=0 || j=H-1 || k=0 || k=W-1)
      cout << "#";
    else 
      cout << ".";
   }
   cout << endl;
  }
  cout << endl;
 }
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:29: error: lvalue required as left operand of assignment
   15 |     if( j=0 || j=H-1 || k=0 || k=W-1)
      |                           ~~^~~~