criyle/codenet-compile-errors huggingface dataset:
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<w;i++){
   cout << "#" ;
  }
  cout << endl;
  for(i=1;i<h-1;i++){
   cout << "#" ;
   for(int j=1;j<w-1;j++){
    cout << "." ;
   }
   cout << "#" << endl;
  }
  for(int i=0;i<w;i++){
   cout << "#" ;
  }
  cout << endl;
 }
 cout << endl;

 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:7: error: 'i' was not declared in this scope
   14 |   for(i=1;i<h-1;i++){
      |       ^
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<w;i++){
   cout << "#" ;
  }
  cout << endl;
  for(i=1;i<h-1;i++){
   cout << "#" ;
   for(int j=1;j<w-1;j++){
    cout << "." ;
   }
   cout << "#" << endl;
  }
  for(i=0;i<w;i++){
   cout << "#" ;
  }
  cout << endl;
 }
 cout << endl;

 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:7: error: 'i' was not declared in this scope
   14 |   for(i=1;i<h-1;i++){
      |       ^
a.cc:21:7: error: 'i' was not declared in this scope
   21 |   for(i=0;i<w;i++){
      |       ^
Language: C++

#include <iostream>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
	int H,W;
	do{
		cin>>H>>W;

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


	return 0;
}

Compiler output:
a.cc:3:22: error: '_TCHAR' has not been declared
    3 | int _tmain(int argc, _TCHAR* argv[])
      |                      ^~~~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
while(true){
int h,w;
cin>>h>>w;
if(h==0&&w==0)
return 0;
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<<'\n';
}


}





}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:16: error: lvalue required as left operand of assignment
   11 | if(i==0||i==h-1||j=0||j==w-1)
      |    ~~~~~~~~~~~~^~~
Language: C++

#include<iostream>
using namespace std;
int main(){
while(true){
int h,w;
cin>>h>>w;
if(h==0&&w==0)
return 0;
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<<'\n';
}
cout<<'\n';

}





}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:16: error: lvalue required as left operand of assignment
   11 | if(i==0||i==h-1||j=0||j==w-1)
      |    ~~~~~~~~~~~~^~~
Language: C++

#incude <stdio.h>
int main(void){
	int H = 0, W = 0;
	while (1){
		scanf("%d %d", &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 && i != H - 1 && j != W - 1){
					printf(".");
				}
				else{
					printf("#");
				}
			}
			printf("\n");
		}
		printf("\n");
	}
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #incude; did you mean #include?
    1 | #incude <stdio.h>
      |  ^~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:5:17: error: 'scanf' was not declared in this scope
    5 |                 scanf("%d %d", &H, &W);
      |                 ^~~~~
a.cc:14:41: error: 'printf' was not declared in this scope
   14 |                                         printf(".");
      |                                         ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | #incude <stdio.h>
a.cc:17:41: error: 'printf' was not declared in this scope
   17 |                                         printf("#");
      |                                         ^~~~~~
a.cc:17:41: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:20:25: error: 'printf' was not declared in this scope
   20 |                         printf("\n");
      |                         ^~~~~~
a.cc:20:25: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:22:17: error: 'printf' was not declared in this scope
   22 |                 printf("\n");
      |                 ^~~~~~
a.cc:22:17: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#include <stdio.h>

int main(){
  for(;;){
    int H,W,x,y,z,w;
    scanf("%d %d",&H ,&W);
    if(H==0 && W==0){
      return 0;
    }
    for(x=0;x<W;x++){
      printf("#");
    }
    printf("\n");
    for(z=0;z<(H-2);z++){
      printf("#")
      for(y=0;y<(W-2);y++){
      printf(".");  
      }
      printf("#")
      printf("\n");
    }
    for(w=0;w<W;w++){
      printf("#");
    }
    printf("\n")
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:18: error: expected ';' before 'for'
   15 |       printf("#")
      |                  ^
      |                  ;
   16 |       for(y=0;y<(W-2);y++){
      |       ~~~         
a.cc:16:26: error: expected ';' before ')' token
   16 |       for(y=0;y<(W-2);y++){
      |                          ^
      |                          ;
a.cc:19:18: error: expected ';' before 'printf'
   19 |       printf("#")
      |                  ^
      |                  ;
   20 |       printf("\n");
      |       ~~~~~~      
a.cc:25:17: error: expected ';' before '}' token
   25 |     printf("\n")
      |                 ^
      |                 ;
   26 |   }
      |   ~
Language: C++

#include "cstdio"

int main (){
    int h,w;

    for(;;){
        scanf("%d%d",&h,&w);
        if(h==0&&w==0) break;
        for(int k=0;k<w;k++){
            printf("#");
        }
        printf("\n");
        for(int i=0;i<h-2;i++){
            printf("#");
            for(int j=0;j<w-2;j++){
                printf(".");
            }
            printf("#\n");
        }
        for(int s=0;s<w;k++){
            printf("#");
        }
        printf("\n\n");
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:25: error: 'k' was not declared in this scope
   20 |         for(int s=0;s<w;k++){
      |                         ^
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 (i=0; i<H; i++)
		{
			for (j=0; j<W; j+++)
			{
				if ((i==0) || (i==H-1) || (j==0) || (j==W-1)) {
					cout << "#" ;
					} 
					else {
					cout << "." ;
					}
			}
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:44: error: expected primary-expression before ')' token
   12 |                         for (j=0; j<W; j+++)
      |                                            ^
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 ( i=0; i<H; i++)
		{
			for ( j=0; j<W; j+++)
			{
				if ((i==0) || (i==H-1) || (j==0) || (j==W-1)) {
					cout << "#" ;
					} 
					else {
					cout << "." ;
					}
			}
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:45: error: expected primary-expression before ')' token
   12 |                         for ( j=0; j<W; j+++)
      |                                             ^
Language: C++

import java.io.BufferedReader;
import java.io.InputStreamReader;
class Main {
    public static void main(String[] args) throws Exception{
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            String line = null;
            while((line = br.readLine()) != null){
            	String lines[] = line.split(" ");
            	int height = Integer.parseInt(lines[0]);
            	int width = Integer.parseInt(lines[1]);
            	if(height==0||width==0)break;
            	for(int i=0;i<height;i++){
            		for(int j=0; j<width; j++){
            			if(i==0 || i==height-1){
            				System.out.print("#");
            			}else{
            				System.out.print((j==0 || j==width-1) ? "#" : ".");
            			}
            		}
            		System.out.println("");
            	}
            }
    }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.io.BufferedReader;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.io.InputStreamReader;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:11: error: expected ':' before 'static'
    4 |     public static void main(String[] args) throws Exception{
      |           ^~~~~~~
      |           :
a.cc:4:29: error: 'String' has not been declared
    4 |     public static void main(String[] args) throws Exception{
      |                             ^~~~~~
a.cc:4:38: error: expected ',' or '...' before 'args'
    4 |     public static void main(String[] args) throws Exception{
      |                                      ^~~~
a.cc:4:42: error: expected ';' at end of member declaration
    4 |     public static void main(String[] args) throws Exception{
      |                                          ^
      |                                           ;
a.cc:4:44: error: 'throws' does not name a type
    4 |     public static void main(String[] args) throws Exception{
      |                                            ^~~~~~
a.cc:24:2: error: expected ';' after class definition
   24 | }
      |  ^
      |  ;
Language: C++

#include<iostream>
using namespace std;

int main() {
	int h, w;
	while (cin >> h >> w && h != 0 || w != 0) {
		for (int i = 0; i < h; ++i) {
			for (int i2 = 0; i2 < w; ++i2) {
				if (i == 0 || i2 == 0 || i == h - 1 || i2 == w - 1) {
					cout << "#";
				}
				else {
					cout << "."
				}
			}
			cout << endl;
		}
		cout << endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:52: error: expected ';' before '}' token
   13 |                                         cout << "."
      |                                                    ^
      |                                                    ;
   14 |                                 }
      |                                 ~
Language: C++

#include<stdio.h>
int main() {
    int i, j, a, b;
    scanf_s("%d%d", &a, &b);
    for (i = 0; i < a;i++) {
	for (j = 0; j < b; j++) {
	    printf("*");
	}
	printf("\n");
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:5: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
    4 |     scanf_s("%d%d", &a, &b);
      |     ^~~~~~~
      |     scanf
Language: C++

#include<stdio.h>
int main() {
	int i, j, a, b;
	scanf_s("%d%d", &a, &b);
	for (i = 0; i < a;i++) {
		for (j = 0; j < b; j++) {
			printf("*");
		}
		printf("\n");
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
    4 |         scanf_s("%d%d", &a, &b);
      |         ^~~~~~~
      |         scanf
Language: C++

while True:
 h,w=map(int,input().split())
 if h==0:break
 print([#]*w)
 for _ in range(h-2):print("#".join(['.']*(w-2)))
 print([#]*w\n)

Compiler output:
a.cc:4:9: error: stray '#' in program
    4 |  print([#]*w)
      |         ^
a.cc:6:9: error: stray '#' in program
    6 |  print([#]*w\n)
      |         ^
a.cc:6:13: error: stray '\' in program
    6 |  print([#]*w\n)
      |             ^
a.cc:1:1: error: expected unqualified-id before 'while'
    1 | while True:
      | ^~~~~
Language: C++

#include <stdio.h>

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:30: error: expected ';' before ')' token
    8 |         for(i = 0, i < H; i++){
      |                              ^
      |                              ;
Language: C++

#include <iostream>
using namespace std;

int main(void) {
 while(1) {
   int H {0};
   int W {0};
   cin >> H >> W;

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:17:23: error: expected ';' before '}' token
   17 |            cout << "#"
      |                       ^
      |                       ;
   18 |        } else {
      |        ~
Language: C++

#include <iostream>

using namespace std;

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



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

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

    	int H = 0;
    	int W = 0;

    	Scanner sc= new Scanner(System.in);

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

    		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) ) {
            			System.out.print( '#' );
    				}else {
    					System.out.print( '.' );
    				}
    			}
    			System.out.print( "\n" );
    		}
    		System.out.print( "\n" );
    	}
    	sc.close();
    }
}


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:3:1: error: expected unqualified-id before 'public'
    3 | public class Main {
      | ^~~~~~
Language: C++

#include <stdio.h>

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:35: error: lvalue required as left operand of assignment
   10 |         if(!k || !j || j == h - 1 || k = w - 1) printf("#");
      |            ~~~~~~~~~~~~~~~~~~~~~~~^~~~
Language: C++

#include<cstdio>
using namespace std;
int main(){
 int w,h;

 while(1){
  scanf("%d %d",&h,&w);
  if(w==0 && h==0){
   return 0;
  }
  for(int i=0;i<h;i++){
   for(int j=0;j<w;j++){
    if(i!=0 || i!=h || j!=0 || j!=w){
     print(".");
    }else if{
     printf("#");
    }
   }
   printf("\n");
  }
  printf("\n");
 }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:6: error: 'print' was not declared in this scope; did you mean 'printf'?
   14 |      print(".");
      |      ^~~~~
      |      printf
a.cc:15:13: error: expected '(' before '{' token
   15 |     }else if{
      |             ^
      |             (
Language: C++

#include<cstdio>
using namespace std;
int main(){
 int w,h;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:15:13: error: expected '(' before '{' token
   15 |     }else if{
      |             ^
      |             (
Language: C++

#include<cstdio>
using namespace std;
int main(){
 int w,h;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:15:13: error: expected '(' before '{' token
   15 |     }else if{
      |             ^
      |             (
Language: C++

#include<cstdio>
using namespace std;
int main(){
 int w,h;

 while(1){
  scanf("%d %d",&h,&w);
  if(w==0 && h==0){
   return 0;
  }
  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){
     printf(".");
    }else if{
     printf("#");
    }
   }
   printf("\n");
  }
  printf("\n");
 }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:13: error: expected '(' before '{' token
   15 |     }else if{
      |             ^
      |             (
Language: C++

#include<cstdio>
using namespace std;
int main(){
 int w,h;

 while(1){
  scanf("%d %d",&h,&w);
  if(w==0 && h==0){
   return 0;
  }
  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)){
     printf(".");
    }else if{
     printf("#");
    }
   }
   printf("\n");
  }
  printf("\n");
 }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:13: error: expected '(' before '{' token
   15 |     }else if{
      |             ^
      |             (
Language: C++

#include<stdio.h>
#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<string.h>
#include<math.h>
#include<utility>
#include<map>
using namespace std;
typedef long long int ll;
typedef long double ld;
typedef vector<ll> vi;
typedef vector<string> vs;
typedef pair<ll,ll> P;
typedef vector<P> vp;
#define REP(i,n) for(ll i=0;i<n;i++)
#define FOR(i,m,n) for(ll i=m;i<n;i++)
#define REPR(i,n) for(ll i=n-1;i>=0;i--)
#define FORR(i,n,m) for(ll i=n-1;i>=m;i--)
#define all(in) in.begin(),in.end()
#define ALL(in,K) in,in+K
#define INF 100000000
#define MOD 100000007
#define SIZE 100005
#define pi 	3.14159265358979323846

int main(){
	ll H,W;
	while(1){
		cin >> H >> W;
		if(H==0&&W==0){break;}
		REP(i,H){
			REP(i,W){
				if(i==0 || i==H-1 || || j==0 || j== W){
					printf("#");
				}else{
					printf(".");
				}
			}
			prtinf("\n")
		}
	printf("\n");
	}
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:35:54: error: expected primary-expression before '||' token
   35 |                                 if(i==0 || i==H-1 || || j==0 || j== W){
      |                                                      ^~
a.cc:35:57: error: 'j' was not declared in this scope
   35 |                                 if(i==0 || i==H-1 || || j==0 || j== W){
      |                                                         ^
a.cc:41:25: error: 'prtinf' was not declared in this scope; did you mean 'printf'?
   41 |                         prtinf("\n")
      |                         ^~~~~~
      |                         printf
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
    while(1) {
    cin >> H>>W;
    if (H ==0 && W ==0) break;
     for (int a = 0;a<W;a++){
     cout << "#";
     } 
     for (int b = 0;b< H-2;b++){
     cout << "#"
          for (int c = 0;c<W-2;c++){
               cout <<".";
          }
     cout << "#";
     }
     cout << endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:12: error: 'H' was not declared in this scope
    6 |     cin >> H>>W;
      |            ^
a.cc:6:15: error: 'W' was not declared in this scope
    6 |     cin >> H>>W;
      |               ^
a.cc:12:17: error: expected ';' before 'for'
   12 |      cout << "#"
      |                 ^
      |                 ;
   13 |           for (int c = 0;c<W-2;c++){
      |           ~~~    
a.cc:13:26: error: 'c' was not declared in this scope
   13 |           for (int c = 0;c<W-2;c++){
      |                          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
    while(1) {
        int H,W;
    cin >> H>>W;
    if (H ==0 && W ==0) break;
     for (int a = 0;a<W;a++){
     cout << "#";
     } 
     for (int b = 0;b< H-2;b++){
     cout << "#"
          for (int c = 0;c<W-2;c++){
               cout <<".";
          }
     cout << "#";
     }
     cout << endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:17: error: expected ';' before 'for'
   13 |      cout << "#"
      |                 ^
      |                 ;
   14 |           for (int c = 0;c<W-2;c++){
      |           ~~~    
a.cc:14:26: error: 'c' was not declared in this scope
   14 |           for (int c = 0;c<W-2;c++){
      |                          ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    while(1){
        int H,W
        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:6:9: error: expected initializer before 'cin'
    6 |         cin>>H>>W;
      |         ^~~
a.cc:7:20: error: 'W' was not declared in this scope
    7 |         if(H==0 && W==0)break;
      |                    ^
a.cc:9:27: error: 'W' was not declared in this scope
    9 |             for(int j=0;j<W;j++){
      |                           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
    while(1) {
        int H,W;
    cin >> H>>W;
    if (H ==0 && W ==0) break;
     for (int a = 0;a<W;a++){
     cout << "#";
     } 
     cout << endl;
     for (int b = 0;b< H-2;b++){
     cout << "#";
          for (int c = 0;c<W-2;c++){
               cout <<".";
          }
     cout <<endl;
     for (int a = 0;a<W;a++){
     cout << "#";
     } 
     
     cout << endl;
    }
}


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

#include <bits/stdc++.h>
using namespace std;

int main(){
    while(1) {
        int H,W;
    cin >> H>>W;
    if (H ==0 && W ==0) break;
    
     for (int a = 0;a<W;a++){
     cout << "#";
     } 
     cout << endl;
     
     for (int b = 0;b< H-2;b++){
     cout << "#";
          for (int c = 0;c<W-2;c++){
               cout <<".";
          }
     cout <<"#";
     cout <<endl;
     
     for (int a = 0;a<W;a++){
     cout << "#";
     } 
     
     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 <bits/stdc++.h>
using namespace std;

int main(){
    while(1) {
        int H,W;
    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<<enbdl;
    
    }
}
    


Compiler output:
a.cc:11:25: error: stray '\' in program
   11 |          for (int j = 0 \;j<W;j++) {
      |                         ^
a.cc: In function 'int main()':
a.cc:10:15: error: expected ';' before '+' token
   10 |     for (int i + 0;i<H;i++){
      |               ^~
      |               ;
a.cc:10:23: error: expected ')' before ';' token
   10 |     for (int i + 0;i<H;i++){
      |         ~             ^
      |                       )
a.cc:10:24: error: 'i' was not declared in this scope
   10 |     for (int i + 0;i<H;i++){
      |                        ^
a.cc:18:11: error: 'enbdl' was not declared in this scope
   18 |     cout<<enbdl;
      |           ^~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
    while(1) {
        int H,W;
    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<<enbdl;
    
    }
}
    


Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: expected ';' before '+' token
   10 |     for (int i + 0;i<H;i++){
      |               ^~
      |               ;
a.cc:10:23: error: expected ')' before ';' token
   10 |     for (int i + 0;i<H;i++){
      |         ~             ^
      |                       )
a.cc:10:24: error: 'i' was not declared in this scope
   10 |     for (int i + 0;i<H;i++){
      |                        ^
a.cc:18:11: error: 'enbdl' was not declared in this scope
   18 |     cout<<enbdl;
      |           ^~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
    while(1) {
        int H,W;
    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<<enbdl;
    
    }
}
    


Compiler output:
a.cc: In function 'int main()':
a.cc:18:11: error: 'enbdl' was not declared in this scope
   18 |     cout<<enbdl;
      |           ^~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
while(1){
int H, W;
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 + j) %2 == 0) cout<<"#";
else cout<<".";
}
cout<<endl;
}
cout<<endl;
}
return 0;


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

#include<iostream>

using namespace std;

int main() {
	int H[10000], W[10000];

	for (int i = 0; i < 9999; i++) {
		cin >> H[i] >> W[i];
		if (H[i] == 0 && W[i] == 0) {
			break;
		}
	}

	for (int o = 0; o < 9999; o++) {
		for (int m = 0; m < W[o]; m++) {
			cout << "#";
		}

		cout << endl;

		for (int k = 0; k < H[o]-2; k++) {
			cout << "#";
			for (int l = 0; l < W[o]-2; l++) {
				cout << ".";
			}
			cout << "#" << endl;
		}

		for (int n = 0; n < W[o]; n++) {
			cout << "#" << endl;
		}

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

		cout << endl;
	}

	return 0;



Compiler output:
a.cc: In function 'int main()':
a.cc:41:18: error: expected '}' at end of input
   41 |         return 0;
      |                  ^
a.cc:5:12: note: to match this '{'
    5 | int main() {
      |            ^
Language: C++


using namespace std;

int main(){
while(1){
int H, W;
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;
}
}




Compiler output:
a.cc: In function 'int main()':
a.cc:7:1: error: 'cin' was not declared in this scope
    7 | cin>>H>>W;
      | ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | 
a.cc:12:49: error: 'cout' was not declared in this scope
   12 | if(i == 0 || i == H - 1 || j == 0 || j ==W - 1) cout<<"#";
      |                                                 ^~~~
a.cc:12:49: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:13:6: error: 'cout' was not declared in this scope
   13 | else cout <<".";
      |      ^~~~
a.cc:13:6: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:15:1: error: 'cout' was not declared in this scope
   15 | cout<<endl;
      | ^~~~
a.cc:15:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:15:7: error: 'endl' was not declared in this scope
   15 | cout<<endl;
      |       ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | 
a.cc:17:1: error: 'cout' was not declared in this scope
   17 | cout<<endl;
      | ^~~~
a.cc:17:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:17:7: error: 'endl' was not declared in this scope
   17 | cout<<endl;
      |       ^~~~
a.cc:17:7: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

#include<stdio.h>
int main()
{
	int a, b;
	int c = 0;
	int d = 0;
	int e = 0;
	scanf_s("%d %d",&a, &b);
	while (c <= a) {
		printf("#");
		c++;
	}
	while (d<= b-2)
	{
		printf("#");
		while (e<=a-2) {
			printf(".");
			e++;
		}
		printf("#");
		d++;
	}
	c = 0;
	while (c <= a) {
		printf("#");
		c++;
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
    8 |         scanf_s("%d %d",&a, &b);
      |         ^~~~~~~
      |         scanf
Language: C++

#include<stdio.h>
int main()
{
	int a, b;
	int c = 0;
	int d = 0;
	int e = 0;
	scanf_s("%d", &a);
	scanf_s("%d", &b);
	while (c <= a) {
		printf("#");
		c++;
	};
	while (d<= b-2){
		printf("#");
		while (e<=a-2) {
			printf(".");
			e++;
		};
		printf("#");
		d++;
	};
	c = 0;
	while (c <= a) {
		printf("#");
		c++;
	};
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
    8 |         scanf_s("%d", &a);
      |         ^~~~~~~
      |         scanf
Language: C++

#include<stdio.h>
int main()
{
	int a, b;
	int c = 1;
	int d;
	int e;
	int f = 1;
	int g = 1;
	while(true){
	scanf_s("%d", &a);
	scanf_s("%d", &b);
	d = b - 2;
	e = a - 2;
	if (a == 0, b == 0) {
		break;
	}
		while (c <= a) {
			printf("#");
			c++;
		};
		printf("\n");
		while (f <= d) {
			printf("#");
			g = 1;
			while (g <= e) {
				printf(".");
				g++;
			};
			printf("#\n");
			f++;
		};
		c = 1;
		while (c <= a) {
			printf("#");
			c++;
		};
		c = 1;
		g = 1;
		f = 1;
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   11 |         scanf_s("%d", &a);
      |         ^~~~~~~
      |         scanf
Language: C++

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

 return 0;


}
   


Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: lvalue required as left operand of assignment
    6 |    if (H == 0 && W = 0) break;
      |        ~~~~~~~^~~~
a.cc:26:2: error: expected '}' at end of input
   26 | }
      |  ^
a.cc:4:13: note: to match this '{'
    4 |   while (1) {
      |             ^
a.cc:26:2: error: expected '}' at end of input
   26 | }
      |  ^
a.cc:2:13: note: to match this '{'
    2 |  int main() {
      |             ^
Language: C++

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

 return 0;


}
   


Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: lvalue required as left operand of assignment
    6 |    if (H == 0 && W = 0) break;
      |        ~~~~~~~^~~~
a.cc:7:23: error: expected primary-expression before '<' token
    7 |    for (int i = 1; i =< H; i++) {
      |                       ^
a.cc:8:24: error: expected primary-expression before '<' token
    8 |     for (int j = 1; j =< W; j++) {
      |                        ^
a.cc:26:2: error: expected '}' at end of input
   26 | }
      |  ^
a.cc:4:13: note: to match this '{'
    4 |   while (1) {
      |             ^
a.cc:26:2: error: expected '}' at end of input
   26 | }
      |  ^
a.cc:2:13: note: to match this '{'
    2 |  int main() {
      |             ^
Language: C++

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

 return 0;


}
   


Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: lvalue required as left operand of assignment
    6 |    if (H == 0 && W = 0) break;
      |        ~~~~~~~^~~~
a.cc:26:2: error: expected '}' at end of input
   26 | }
      |  ^
a.cc:2:13: note: to match this '{'
    2 |  int main() {
      |             ^
Language: C++

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

 return 0;


}
   


Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: lvalue required as left operand of assignment
    6 |    if (H == 0 && W = 0) break;
      |        ~~~~~~~^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
  while(1){
    int H, W;
    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;
    }

    return 0;
  }
  
							


Compiler output:
a.cc: In function 'int main()':
a.cc:12:52: error: 'w' was not declared in this scope
   12 |         if(i == 0 || i == H - 1 || j == 0 || j ==  w - 1) cout<<"#";
      |                                                    ^
a.cc:19:4: error: expected '}' at end of input
   19 |   }
      |    ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
  while(1){
    int H, W;
    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:12:52: error: 'w' was not declared in this scope
   12 |         if(i == 0 || i == H - 1 || 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(i=0;i<h;i++){
            for(j=0;j<w;j++){
                if(i==0||j==0||i==h-1||j==w-1)cout<<"#";
                else cout<<".";
            }cout<<endl;
        }cout<<endl;
    }return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: 'i' was not declared in this scope
    9 |         for(i=0;i<h;i++){
      |             ^
a.cc:10:17: error: 'j' was not declared in this scope
   10 |             for(j=0;j<w;j++){
      |                 ^
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==||i==h-1||j==0||j==w-1){
printf("#");
}else{
printf(".");
}
}
cout<<"\n";
}
cout<<endl;
}
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:7: error: expected primary-expression before '||' token
   10 | if(i==||i==h-1||j==0||j==w-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==||i==h-1||j==0||j==w-1){
cout<<"#";
}else{
cout<<".";
}
}
cout<<"\n";
}
cout<<endl;
}
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:7: error: expected primary-expression before '||' token
   10 | if(i==||i==h-1||j==0||j==w-1){
      |       ^~
Language: C++

#include <iostream>
#include <cstdio>
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 << "#";
               }else{
                   cout << ".";
               }
           }
           cout << "\n";
       }
       cout endl;
       



   }
   return 0;
    
}


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

#include<cstdio>

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


Compiler output:
a.cc: In function 'int main()':
a.cc:12:11: warning: division by zero [-Wdiv-by-zero]
   12 |     if (s %= 0){
      |         ~~^~~~
a.cc:14:5: error: expected '}' before 'else'
   14 |     else
      |     ^~~~
a.cc:12:16: note: to match this '{'
   12 |     if (s %= 0){
      |                ^
a.cc: At global scope:
a.cc:22:1: error: expected declaration before '}' token
   22 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
   while(1){
     int h,w;
     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;
   }

   


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

#include <bits/stdc++.h>
using namespace std;

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

  for ( int i == 0;i<H;i++){
   for ( int j == 0 ;j<W;j++){
     if(  ){
         printf(".");
     }else{
        printf("#");
     }
   }
   printf("\n");
  } cout<<endl;
}cout<<endl;
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: expected ';' before '==' token
    9 |   for ( int i == 0;i<H;i++){
      |              ^~~
      |              ;
a.cc:9:15: error: expected primary-expression before '==' token
    9 |   for ( int i == 0;i<H;i++){
      |               ^~
a.cc:9:23: error: expected ')' before ';' token
    9 |   for ( int i == 0;i<H;i++){
      |       ~               ^
      |                       )
a.cc:9:24: error: 'i' was not declared in this scope
    9 |   for ( int i == 0;i<H;i++){
      |                        ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

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

  for ( int i==0;i<H;i++){
   for ( int j==0 ;j<W;j++){
     if(  ){
         printf(".");
     }else{
        printf("#");
     }
   }
   printf("\n");
  } cout<<endl;
}cout<<endl;
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: expected ';' before '==' token
    9 |   for ( int i==0;i<H;i++){
      |              ^~
      |              ;
a.cc:9:14: error: expected primary-expression before '==' token
    9 |   for ( int i==0;i<H;i++){
      |              ^~
a.cc:9:21: error: expected ')' before ';' token
    9 |   for ( int i==0;i<H;i++){
      |       ~             ^
      |                     )
a.cc:9:22: error: 'i' was not declared in this scope
    9 |   for ( int i==0;i<H;i++){
      |                      ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

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

  for (int i == 0;i<H;i++){
   for (int j == 0 ;j<W;j++){
     if(   ){
         printf(".");
     }else{
        printf("#");
     }
   }
   printf("\n");
  } cout<<endl;
}cout<<endl;
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: expected ';' before '==' token
    9 |   for (int i == 0;i<H;i++){
      |             ^~~
      |             ;
a.cc:9:14: error: expected primary-expression before '==' token
    9 |   for (int i == 0;i<H;i++){
      |              ^~
a.cc:9:22: error: expected ')' before ';' token
    9 |   for (int i == 0;i<H;i++){
      |       ~              ^
      |                      )
a.cc:9:23: error: 'i' was not declared in this scope
    9 |   for (int i == 0;i<H;i++){
      |                       ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: expected ')' before '$$W'
    8 |  if(H==0 $$W==0)break;
      |    ~    ^~~~
      |         )
a.cc:11:12: error: expected primary-expression before ')' token
   11 |      if(   ){
      |            ^
a.cc:20:2: error: expected '}' at end of input
   20 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 |  int main(){
      |            ^
Language: C++

//============================================================================
// Name        : (^o^).cpp
// Author      :
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include<iostream>
#include<stdio.h>
using namespace std;

int main(){
    int a,b,t,m;
    t=0;
    m=0;
    while(1)
    {
    cin>>a>>b;
    if(a==0&&b==0){
    	return 0;
    }
    while (1){
    	cout<<"#";
    	m++;
    	if(m==a){
    		cout<<endl;
    		m=0;
    		break;
    	}
    }while(1){cout<<"#";
    while (1){
    	cout<<".";
    	m++;
    	if(m==b-2){
    		m=0;
    		break;
    	}cout<<"#"<<endl;
        t++;
if(t==a-2){break;}
}

    	}
	return 0;
}



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


#include<cstdio>

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


Compiler output:
a.cc: In function 'int main()':
a.cc:26:12: error: 'i' was not declared in this scope
   26 |         if(i == H){
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
     
int main() {
  for (int W = 0; ;W++) {
   int A, B;
   cin >> A >> B;
   for (int X = 0; X < A; X++) {

    if (X == 0 || X == A - 1) {
     for (int Y1 = 0; Y1 < B; Y1++) {
      cout << "#";
     }
    
    else
     for (int Y2 = 0; Y2 < B; Y2++) {
      if (B == 0 || B == Y2 - 1) {
       cout << "#";
      }
      
      else
       cout << ".";

     }
     
     cout << endl;
  }
  cout << endl;
 }

}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:5: error: expected '}' before 'else'
   15 |     else
      |     ^~~~
a.cc:10:31: note: to match this '{'
   10 |     if (X == 0 || X == A - 1) {
      |                               ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
     
int main() {
  for (int W = 0; ;W++) {
   int A, B;
   cin >> A >> B;
   for (int X = 0; X < A; X++) {

    if (X == 0 || X == A - 1) {
     for (int Y1 = 0; Y1 < B; Y1++) {
      cout << "#";
     }
    
    else
     for (int Y2 = 0; Y2 < B; Y2++) {
      if (B == 0 || B == Y2 - 1) {
       cout << "#";
      }
      
      else
       cout << ".";

     }
     
     cout << endl;
   }
  cout << endl;
  }
 }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:5: error: expected '}' before 'else'
   15 |     else
      |     ^~~~
a.cc:10:31: note: to match this '{'
   10 |     if (X == 0 || X == A - 1) {
      |                               ^
a.cc: At global scope:
a.cc:31:1: error: expected declaration before '}' token
   31 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
	int H,W;
	for(int a=0;a<1000000;a++){
		cin>>H>>W;
		if(H==0&&W==0){
			a=1000000
		}
		else if(a!=0){
			cout<<endl;
		}
		for(int b=0;b<H;b++){
			for(int c=0;c<W;c++){
				if(b==0||b==H-1){
					cout<<"#";
				}
				else if(c==0||c==W-1){
					cout<<"#";
				}
				else{
					cout<<".";
				}
			}
			cout<<endl;
		}
	}
}



Compiler output:
a.cc: In function 'int main()':
a.cc:8:34: error: expected ';' before '}' token
    8 |                         a=1000000
      |                                  ^
      |                                  ;
    9 |                 }
      |                 ~
Language: C++

#include<bits/stdc++.h>
using namespace std;


int main(){
    while(1){
    
    int H,W;
    cin>>H>>W;
    if(H == 0 && W == 0) break;
    
    for(int i=0;i<H;i++){
        for(int i=0;i<W;i++){
            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:14:38: error: 'j' was not declared in this scope
   14 |             if(i == 0 || i == H-1 || j == 0 || j == W-1) cout<<"#";
      |                                      ^
Language: C++

#include <stdio.h>

int main(){
    int H;
	int W;
    
	while(true){
		scanf("%d %d",&H,&W);
		
		if(H == 0 && W == 0){
			break;
		}
		
		for (int hol=0;hol<W;hol++){
			printf("#");
		}
		printf("\n");
		
		for (int var=0;var<H;i++){
			printf("#");
			for (int hol=1;hol<W-1;l++){
				printf(".");
			}
			printf("#\n");
		}
	}
	printf("\n");
    
    return 0;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:19:38: error: 'i' was not declared in this scope
   19 |                 for (int var=0;var<H;i++){
      |                                      ^
a.cc:21:48: error: 'l' was not declared in this scope
   21 |                         for (int hol=1;hol<W-1;l++){
      |                                                ^
Language: C++

#include <cstdio>

int main(){
    int H,W;
    while(true){
        scanf("%d %d",&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){
                printf("#");}
                else printf(".");
            }
            printf("\n");
        }
        printf("\n");
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:34: error: 'h' was not declared in this scope
   10 |                 if(i == 0 ||i == h - 1||j == 0||j == w - 1){
      |                                  ^
a.cc:10:54: error: 'w' was not declared in this scope
   10 |                 if(i == 0 ||i == h - 1||j == 0||j == w - 1){
      |                                                      ^