criyle/codenet-compile-errors huggingface dataset:
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:35: error: 'h' was not declared in this scope
   10 |                 if(i == 0 || i == h - 1 || j == 0 || j == w - 1){
      |                                   ^
a.cc:10:59: error: 'w' was not declared in this scope
   10 |                 if(i == 0 || i == h - 1 || j == 0 || j == w - 1){
      |                                                           ^
Language: C++

judge = True
while judge:
    H,W = list(map(int,input().split()))
    if H + W == 0:
        judge = False #finish
    else:
        for i in range(0, H):# H
            print("#",end="")
            if i == 0 or i == (H - 1):
                for j in range(1, W-1):
                    print("#",end="")
                print("#")
            else:
                for j in range(1, W-1):
                    print(".",end="")
                print("#")
    print()



Compiler output:
a.cc:5:23: error: stray '#' in program
    5 |         judge = False #finish
      |                       ^
a.cc:7:30: error: stray '#' in program
    7 |         for i in range(0, H):# H
      |                              ^
a.cc:1:1: error: 'judge' does not name a type
    1 | judge = True
      | ^~~~~
Language: C++

# -*- coding: utf-8

while True:
   a = map(int,raw_input().split())
   print('#'*a[1])
   for i in range(a[0]-2):
      b ='.'*(a[1]-2)
      print('#'+b+'#')
   print('#'*a[1])
   print('')
   if a == [0,0]:
      break



Compiler output:
a.cc:1:3: error: invalid preprocessing directive #-
    1 | # -*- coding: utf-8
      |   ^
a.cc:10:10: error: empty character constant
   10 |    print('')
      |          ^~
a.cc:3:1: error: expected unqualified-id before 'while'
    3 | while True:
      | ^~~~~
Language: C++

#include <stdio.h>

int main() {

	int i;
	int j;
	int H;
	int W;

	while (true) {

		scanf_s("%d%d", &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 ) {

					printf("#");

				}

				else {

					printf(".");

				}

			}

			printf("\n");

		}


	}

	return 0;

} 


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

#include <iostream>
using namespace std;
int main(){
  
  int a,b;
    for(int i=0;i<999999;i++){
        cin >> a >> b;
        if(a==0 && b==0){
            break;
        }
        for(int l=0;l<b;l++){
            cout << "#";
        }
        cout << endl;
        for(int k=0;k<a-2;k++){
            cout << "#";
            for(int j=0;j<b-2;j++){
                cout <<".";
            }
            cout << "#" << endl;
        }
        for(int m=0;m<b;m++){
            cout <<"#";
        }
        cout << endl;
}


Compiler output:
a.cc: In function 'int main()':
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 <stdio.h>

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


Compiler output:
a.cc: In function 'int main()':
a.cc:14:11: error: 'print' was not declared in this scope; did you mean 'printf'?
   14 |           print(".");
      |           ^~~~~
      |           printf
Language: C++

#include<iostream>
using namespace std;
int main(){
    int a,b;
    while(cin>>a>>b){
        if(a==0&&b==0)
            break;
        for(int i=0,i<b;i++)
            cout<<"#"
            cout<<endl;
        for(int i=2;i<a;i++)
            {
                cout<<"#";
            for(int j=2;j<b;j++)
                {cout<<".";}
                cout<<"#"<<endl;
            }
            cout<<endl;
        for(int i=0,i<b;i++)
            cout<<"#"
            cout<<endl;

    }
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:8:22: error: expected ';' before '<' token
    8 |         for(int i=0,i<b;i++)
      |                      ^
      |                      ;
a.cc:8:22: error: expected primary-expression before '<' token
a.cc:9:22: error: expected ';' before 'cout'
    9 |             cout<<"#"
      |                      ^
      |                      ;
   10 |             cout<<endl;
      |             ~~~~      
a.cc:19:22: error: expected ';' before '<' token
   19 |         for(int i=0,i<b;i++)
      |                      ^
      |                      ;
a.cc:19:22: error: expected primary-expression before '<' token
a.cc:20:22: error: expected ';' before 'cout'
   20 |             cout<<"#"
      |                      ^
      |                      ;
   21 |             cout<<endl;
      |             ~~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
    int a,b;
    while(cin>>a>>b){
        if(a==0&&b==0)
            break;
        for(int i=0,i<b;i++)
            cout<<"#";
            cout<<endl;
        for(int i=2;i<a;i++)
            {
                cout<<"#";
            for(int j=2;j<b;j++)
                {cout<<".";}
                cout<<"#"<<endl;
            }
            cout<<endl;
        for(int i=0,i<b;i++)
            cout<<"#"
            cout<<endl;

    }
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:8:22: error: expected ';' before '<' token
    8 |         for(int i=0,i<b;i++)
      |                      ^
      |                      ;
a.cc:8:22: error: expected primary-expression before '<' token
a.cc:19:22: error: expected ';' before '<' token
   19 |         for(int i=0,i<b;i++)
      |                      ^
      |                      ;
a.cc:19:22: error: expected primary-expression before '<' token
a.cc:20:22: error: expected ';' before 'cout'
   20 |             cout<<"#"
      |                      ^
      |                      ;
   21 |             cout<<endl;
      |             ~~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
    int a,b;
    while(cin>>a>>b){
        if(a==0&&b==0)
            break;
        for(int i=0,i<b;i++)
            cout<<"#";
            cout<<endl;
        for(int i=2;i<a;i++)
            {
                cout<<"#";
            for(int j=2;j<b;j++)
                {cout<<".";}
                cout<<"#"<<endl;
            }
            cout<<endl;
        for(int i=0,i<b;i++)
            cout<<"#";
            cout<<endl;

    }
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:8:22: error: expected ';' before '<' token
    8 |         for(int i=0,i<b;i++)
      |                      ^
      |                      ;
a.cc:8:22: error: expected primary-expression before '<' token
a.cc:19:22: error: expected ';' before '<' token
   19 |         for(int i=0,i<b;i++)
      |                      ^
      |                      ;
a.cc:19:22: error: expected primary-expression before '<' token
Language: C++

#include<iostream>
using namespace std;
int main(){
    int a,b;
    while(cin>>a>>b){
        if(a==0&&b==0)
            break;
            
        for(int i=0,i<b;i++)
            cout<<"#";
            cout<<endl;
            
        for(int i=2;i<a;i++)
            {
                cout<<"#";
            for(int j=2;j<b;j++)
                {cout<<".";}
                cout<<"#"<<endl;
            }
            cout<<endl;
            
        for(int i=0,i<b;i++)
            cout<<"#";
            cout<<endl;

    }
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:9:22: error: expected ';' before '<' token
    9 |         for(int i=0,i<b;i++)
      |                      ^
      |                      ;
a.cc:9:22: error: expected primary-expression before '<' token
a.cc:22:22: error: expected ';' before '<' token
   22 |         for(int i=0,i<b;i++)
      |                      ^
      |                      ;
a.cc:22:22: error: expected primary-expression before '<' token
Language: C++

#include <stdio.h>
int main(void){
 int h,w;
 int 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(i == 0||i == h-1||j == 0||j == w-1){
             printf("#");
         }else {
         printf(".");
     }
     printf("\n");
 }
 return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:18:2: error: expected '}' at end of input
   18 | }
      |  ^
a.cc:5:10: note: to match this '{'
    5 |  while(1){
      |          ^
a.cc:18:2: error: expected '}' at end of input
   18 | }
      |  ^
a.cc:2:15: note: to match this '{'
    2 | int main(void){
      |               ^
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:19:52: error: expected ';' before '}' token
   19 |                                         cout << "#"
      |                                                    ^
      |                                                    ;
   20 |                                 }else{
      |                                 ~                   
a.cc:21:52: error: expected ';' before '}' token
   21 |                                         cout << "."
      |                                                    ^
      |                                                    ;
   22 |                                 }
      |                                 ~
Language: C++

#include<iostream>
#define PI 3.141592653589
using namespace std;

int main(){
	while(1){
		int H,W;
		cin >> H >>W;
		
		if(H==0 && W==0)break;
		for(int x=0;x<W;x++){
			printf("#");
		}
		for(int y=0+1;y<H-1;y++){
			print("#");
			for(int x=0+1;x<W-1;x++){
				printf(".");
			}
			print("#");
			printf("\n");
		}
		for(int x=0;x<W;x++){
			printf("#");
		}
		printf("\n");
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:25: error: 'print' was not declared in this scope; did you mean 'printf'?
   15 |                         print("#");
      |                         ^~~~~
      |                         printf
Language: C++

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

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

#include<iostream>
using namespace std;
int main(void)
{
  while(true)
    {
  int h,w;
  cin>>h;
  cin>>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)cout<<"#";
	  else cout<<".";
	}
      cout<<endl;
    }
  cout<<endl
    }
  return 0;
}

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

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


int main(){


  int H = 0 , W = 0 ;

    
  while (1){#include <iostream>
#include <cstdio>
using namespace std;


int main(){


  int H = 0 , W = 0 ;

    
  while (1){
 
      
      cin >> H >> W ;

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


      for ( int h = 0 ; h < H ; h++ ){

	for ( int w = 0 ; w < W ; w++ ){

	  if ( 0 < h && h < H - 1 && 0 < w && w < W - 1 ){

	    cout << "." ;

	  } else {

	    cout << "#" ;

	  }


	}

	  cout << endl ;

	 
      }
      

      cout << "\n" ;   
  
  }



  return 0 ;


}


 
      
      cin >> H >> W ;

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


      for ( int h = 0 ; h < H ; h++ ){

	for ( int w = 0 ; w < W ; w++ ){

	  if ( 0 < h && h < H - 1 && 0 < w && w < W - 1 ){

	    cout << "." ;

	  } else {

	    cout << "#" ;

	  }


	}

	  cout << endl ;

	 
      }
      

      cout << "\n" ;   
  
  }



  return 0 ;


}

Compiler output:
a.cc:12:13: error: stray '#' in program
   12 |   while (1){#include <iostream>
      |             ^
a.cc: In function 'int main()':
a.cc:12:14: error: 'include' was not declared in this scope
   12 |   while (1){#include <iostream>
      |              ^~~~~~~
a.cc:12:31: error: expected primary-expression before '>' token
   12 |   while (1){#include <iostream>
      |                               ^
a.cc:14:1: error: expected primary-expression before 'using'
   14 | using namespace std;
      | ^~~~~
a.cc:17:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   17 | int main(){
      |         ^~
a.cc:17:9: note: remove parentheses to default-initialize a variable
   17 | int main(){
      |         ^~
      |         --
a.cc:17:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:17:11: error: a function-definition is not allowed here before '{' token
   17 | int main(){
      |           ^
Language: C++

#include <iostream>
#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++){
      if (i == 0 || i==(h-1)){
        for (int j=0; j < w; j++){
          cout << "#";
       	}
        cout << endl;
      }
      else{
        cout << "#";
        for (int k=0; k < (w-2), k++){
          cout << ".";
	}
        cout << "#"<< endl;
      }
    }
    cout << endl;
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:37: error: expected ';' before ')' token
   22 |         for (int k=0; k < (w-2), k++){
      |                                     ^
      |                                     ;
Language: C++

#include <iostream>
//#include <iomanip>
 
using namespace std;
//#define
 
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 k=0;k<w;k++){
               if((i==0)||(i==(h-1)){
                cout << '#';
               }
               if((k==0)||(k==(w-1))){ 
                cout << '#';
               else{
                cout << ".";
               }
            }
            cout << "\n";
        }
        cout << "\n";
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:37: error: expected ';' before '{' token
   16 |                if((i==0)||(i==(h-1)){
      |                                     ^
      |                                     ;
a.cc:19:16: error: expected primary-expression before 'if'
   19 |                if((k==0)||(k==(w-1))){
      |                ^~
a.cc:18:17: error: expected ')' before 'if'
   18 |                }
      |                 ^
      |                 )
   19 |                if((k==0)||(k==(w-1))){
      |                ~~
a.cc:16:18: note: to match this '('
   16 |                if((i==0)||(i==(h-1)){
      |                  ^
a.cc:30:2: error: expected '}' at end of input
   30 | }
      |  ^
a.cc:7:12: note: to match this '{'
    7 | int main() {
      |            ^
Language: C++

#include <iostream>
//#include <iomanip>
 
using namespace std;
//#define
 
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 k=0;k<w;k++){
               if((i==0)||(i==(h-1)){
                cout << '#';
               }
               if((k==0)||(k==(w-1))){ 
                cout << '#';
               else{
                cout << '.';
               }
            }
            cout << "\n";
        }
        cout << "\n";
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:37: error: expected ';' before '{' token
   16 |                if((i==0)||(i==(h-1)){
      |                                     ^
      |                                     ;
a.cc:19:16: error: expected primary-expression before 'if'
   19 |                if((k==0)||(k==(w-1))){
      |                ^~
a.cc:18:17: error: expected ')' before 'if'
   18 |                }
      |                 ^
      |                 )
   19 |                if((k==0)||(k==(w-1))){
      |                ~~
a.cc:16:18: note: to match this '('
   16 |                if((i==0)||(i==(h-1)){
      |                  ^
a.cc:30:2: error: expected '}' at end of input
   30 | }
      |  ^
a.cc:7:12: note: to match this '{'
    7 | int main() {
      |            ^
Language: C++

#include <iostream>
//#include <iomanip>
 
using namespace std;
//#define
 
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 k=0;k<w;k++){
               if((i==0)||(i==(h-1)){
                cout << '#';
               }
               else if((k==0)||(k==(w-1))){ 
                cout << '#';
               }else{
                cout << '.';
               }
            }
            cout << "\n";
        }
        cout << "\n";
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:37: error: expected ')' before '{' token
   16 |                if((i==0)||(i==(h-1)){
      |                  ~                  ^
      |                                     )
a.cc:24:13: error: expected primary-expression before '}' token
   24 |             }
      |             ^
Language: C++

#include <iostream>
//#include <iomanip>
 
using namespace std;
//#define
 
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 k=0;k<w;k++){
               if((i==0)||(i==(h-1)){
                cout << '#';
               
               }else if((k==0)||(k==(w-1))){ 
                cout << '#';
               }else{
                cout << '.';
               }
            }
            cout << "\n";
        }
        cout << "\n";
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:37: error: expected ')' before '{' token
   16 |                if((i==0)||(i==(h-1)){
      |                  ~                  ^
      |                                     )
a.cc:24:13: error: expected primary-expression before '}' token
   24 |             }
      |             ^
Language: C++

#include <iostream>
//#include <iomanip>
 
using namespace std;
//#define
 
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 k=0;k<w;k++){
               if((i==0)||(i==(h-1)){
                cout << '#';
               
               }else if((k==0)||(k==(w-1))){ 
                cout << '#';
               }else{
                cout << ".";
               }
            }
            cout << "\n";
        }
        cout << "\n";
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:37: error: expected ')' before '{' token
   16 |                if((i==0)||(i==(h-1)){
      |                  ~                  ^
      |                                     )
a.cc:24:13: error: expected primary-expression before '}' token
   24 |             }
      |             ^
Language: C++

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

main() {

  int i, j, t, y;

  while(1){

    cin >> t >> y;
  
    if(t == 0 && y == 0){
      break;
    }else{
      
      for(i = 0; i < t; i++){
	for(j = 0; j < y; j++){
	  if(i != 0 && i != t-1 && j != 0 && j != y-1 ){
	    printf(".");
	  }else {
	    printf("#");
	  }
	}
	printf("\n");
      }
      printf("\n");
    }
  }
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<iostream>
      | ^~~~~~~
a.cc:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    5 | main() {
      | ^~~~
a.cc: In function 'int main()':
a.cc:11:5: error: 'cin' was not declared in this scope
   11 |     cin >> t >> y;
      |     ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include<stdio.h>
  +++ |+#include <iostream>
    3 | using namespace std;
a.cc:20:13: error: 'printf' was not declared in this scope
   20 |             printf(".");
      |             ^~~~~~
a.cc:3:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
    2 | #include<stdio.h>
  +++ |+#include <cstdio>
    3 | using namespace std;
a.cc:22:13: error: 'printf' was not declared in this scope
   22 |             printf("#");
      |             ^~~~~~
a.cc:22:13: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:25:9: error: 'printf' was not declared in this scope
   25 |         printf("\n");
      |         ^~~~~~
a.cc:25:9: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:27:7: error: 'printf' was not declared in this scope
   27 |       printf("\n");
      |       ^~~~~~
a.cc:27:7: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#include<stdio.h>

int main(void)
{
    int H, W;
    printf("%d %d", &H, &W);
    while( !( H == 0 && W == 0)){
        for(int i = 0, i < M, ++i){
            printf("#");
        }
        printf("_n")
        for(int i = 0, i < H - 2, ++i){c
             for(int i = 0, i < W -2, ++i){
                 printf(".");
             }
             printf("#");
        }
        for(int i = 0, i < M, ++i){
            printf("#");
        }
        printf("%d %d", &H, &W);
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:25: error: expected ';' before '<' token
    8 |         for(int i = 0, i < M, ++i){
      |                         ^~
      |                         ;
a.cc:8:26: error: expected primary-expression before '<' token
    8 |         for(int i = 0, i < M, ++i){
      |                          ^
a.cc:8:28: error: 'M' was not declared in this scope
    8 |         for(int i = 0, i < M, ++i){
      |                            ^
a.cc:8:34: error: expected ';' before ')' token
    8 |         for(int i = 0, i < M, ++i){
      |                                  ^
      |                                  ;
a.cc:11:21: error: expected ';' before 'for'
   11 |         printf("_n")
      |                     ^
      |                     ;
   12 |         for(int i = 0, i < H - 2, ++i){c
      |         ~~~          
a.cc:18:25: error: expected ';' before '<' token
   18 |         for(int i = 0, i < M, ++i){
      |                         ^~
      |                         ;
a.cc:18:26: error: expected primary-expression before '<' token
   18 |         for(int i = 0, i < M, ++i){
      |                          ^
a.cc:18:28: error: 'M' was not declared in this scope
   18 |         for(int i = 0, i < M, ++i){
      |                            ^
a.cc:18:34: error: expected ';' before ')' token
   18 |         for(int i = 0, i < M, ++i){
      |                                  ^
      |                                  ;
Language: C++

#include<stdio.h>

int main(void)
{
    int H, W;
    printf("%d %d", &H, &W);
    while( !( H == 0 && W == 0)){
        for(int i = 0; i < M; ++i){
            printf("#");
        }
        printf("_n")
        for(int i = 0; i < H - 2; ++i){c
             for(int i = 0; i < W -2; ++i){
                 printf(".");
             }
             printf("#");
        }
        for(int i = 0; i < M; ++i){
            printf("#");
        }
        printf("%d %d", &H, &W);
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:28: error: 'M' was not declared in this scope
    8 |         for(int i = 0; i < M; ++i){
      |                            ^
a.cc:11:21: error: expected ';' before 'for'
   11 |         printf("_n")
      |                     ^
      |                     ;
   12 |         for(int i = 0; i < H - 2; ++i){c
      |         ~~~          
a.cc:12:24: error: 'i' was not declared in this scope
   12 |         for(int i = 0; i < H - 2; ++i){c
      |                        ^
a.cc:18:28: error: 'M' was not declared in this scope
   18 |         for(int i = 0; i < M; ++i){
      |                            ^
Language: C++

#include<stdio.h>

int main(void)
{
    int H, W;
    printf("%d %d", &H, &W);
    while( !( H == 0 && W == 0)){
        for(int i = 0; i < W; ++i){
            printf("#");
        }
        printf("_n")
        for(int i = 0; i < H - 2; ++i){c
             for(int i = 0; i < W -2; ++i){
                 printf(".");
             }
             printf("#");
        }
        for(int i = 0; i < W; ++i){
            printf("#");
        }
        printf("%d %d", &H, &W);
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:21: error: expected ';' before 'for'
   11 |         printf("_n")
      |                     ^
      |                     ;
   12 |         for(int i = 0; i < H - 2; ++i){c
      |         ~~~          
a.cc:12:24: error: 'i' was not declared in this scope
   12 |         for(int i = 0; i < H - 2; ++i){c
      |                        ^
Language: C++

#include<stdio.h>

int main(void)
{
    int H, W;
    printf("%d %d", &H, &W);
    while( !( H == 0 && W == 0)){
        for(int i = 0; i < W; ++i){
            printf("#");
        }
        printf("_n")
        for(int i = 0; i < H - 2; ++i){
             for(int i = 0; i < W -2; ++i){
                 printf(".");
             }
             printf("#");
        }
        for(int i = 0; i < W; ++i){
            printf("#");
        }
        printf("%d %d", &H, &W);
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:21: error: expected ';' before 'for'
   11 |         printf("_n")
      |                     ^
      |                     ;
   12 |         for(int i = 0; i < H - 2; ++i){
      |         ~~~          
a.cc:12:24: error: 'i' was not declared in this scope
   12 |         for(int i = 0; i < H - 2; ++i){
      |                        ^
Language: C++

#include<stdio.h>

int main(void)
{
    int H, W;
    printf("%d %d", &H, &W);
    while( !( H == 0 && W == 0)){
        for(int i = 0; i < W; ++i){
            printf("#");
        }
        printf("_n")
        for(int i = 0; i < H - 2; ++i){
             for(int i = 0; j < W -2; ++j){
                 printf(".");
             }
             printf("#");
        }
        for(int i = 0; i < W; ++i){
            printf("#");
        }
        printf("%d %d", &H, &W);
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:21: error: expected ';' before 'for'
   11 |         printf("_n")
      |                     ^
      |                     ;
   12 |         for(int i = 0; i < H - 2; ++i){
      |         ~~~          
a.cc:12:24: error: 'i' was not declared in this scope
   12 |         for(int i = 0; i < H - 2; ++i){
      |                        ^
Language: Java

import java.util.Scanner;

class Main{
  public static void main(String args[]){
    Scanner sc = new Scanner(Syetem.in);
    while(true)[
      int H = sc.nextInt();
      int W = sc.nextInt();
      for(x = 0; x < H; x++){
        for(y = 0; y < W; y++){
          if(x%2 == 0 && y%2 == 0 || x%2 == 1 && y%2 == 1){
            System.out.print("#");
          }else{
            System.out.print(".");
          }
        }
        System.out.println("");
      }
      System.out.println("");
    }
  }
}



Compiler output:
Main.java:6: error: illegal start of expression
    while(true)[
               ^
Main.java:22: error: class, interface, enum, or record expected
}
^
2 errors
Language: Java

import java.util.Scanner;
 
class Main{
  public static void main(String args[]){
    Scanner sc = new Scanner(Syetem.in);
    while(true){
      int H = sc.nextInt();
      int W = sc.nextInt();
      if(H == 0 && W == 0){
        break;
      }
      for(x = 0; x < H; x++){
        for(y = 0; y < W; y++){
          if(x%2 == 0 && y%2 == 0 || x%2 == 1 && y%2 == 1){
            System.out.print("#");
          }else{
            System.out.print(".");
          }
        }
        System.out.println("");
      }
      System.out.println("");
    }
  }
}


Compiler output:
Main.java:5: error: cannot find symbol
    Scanner sc = new Scanner(Syetem.in);
                             ^
  symbol:   variable Syetem
  location: class Main
Main.java:12: error: cannot find symbol
      for(x = 0; x < H; x++){
          ^
  symbol:   variable x
  location: class Main
Main.java:12: error: cannot find symbol
      for(x = 0; x < H; x++){
                 ^
  symbol:   variable x
  location: class Main
Main.java:12: error: cannot find symbol
      for(x = 0; x < H; x++){
                        ^
  symbol:   variable x
  location: class Main
Main.java:13: error: cannot find symbol
        for(y = 0; y < W; y++){
            ^
  symbol:   variable y
  location: class Main
Main.java:13: error: cannot find symbol
        for(y = 0; y < W; y++){
                   ^
  symbol:   variable y
  location: class Main
Main.java:13: error: cannot find symbol
        for(y = 0; y < W; y++){
                          ^
  symbol:   variable y
  location: class Main
Main.java:14: error: cannot find symbol
          if(x%2 == 0 && y%2 == 0 || x%2 == 1 && y%2 == 1){
             ^
  symbol:   variable x
  location: class Main
Main.java:14: error: cannot find symbol
          if(x%2 == 0 && y%2 == 0 || x%2 == 1 && y%2 == 1){
                         ^
  symbol:   variable y
  location: class Main
Main.java:14: error: cannot find symbol
          if(x%2 == 0 && y%2 == 0 || x%2 == 1 && y%2 == 1){
                                     ^
  symbol:   variable x
  location: class Main
Main.java:14: error: cannot find symbol
          if(x%2 == 0 && y%2 == 0 || x%2 == 1 && y%2 == 1){
                                                 ^
  symbol:   variable y
  location: class Main
11 errors
Language: Java

import java.util.Scanner;
  
class Main{
  public static void main(String args[]){
    Scanner sc = new Scanner(Syetem.in);
    while(true){
      int H = sc.nextInt();
      int W = sc.nextInt();
      if(H == 0 && W == 0){
        break;
      }
      for(int x = 0; x < H; x++){
        for(int y = 0; y < W; y++){
          if(x%2 == 0 && y%2 == 0 || x%2 == 1 && y%2 == 1){
            System.out.print("#");
          }else{
            System.out.print(".");
          }
        }
        System.out.println("");
      }
      System.out.println("");
    }
  }
}


Compiler output:
Main.java:5: error: cannot find symbol
    Scanner sc = new Scanner(Syetem.in);
                             ^
  symbol:   variable Syetem
  location: class Main
1 error
Language: Java



    public static void gyo1(int w2, int number){
        if ( w2 == 1) {
            for (int a = 0; a < number; a++) {
                System.out.printf("#.");
            }
            System.out.printf("#");
        } else {
            for (int a = 0; a < number; a++) {
                System.out.printf("#.");
            }
        }
        System.out.printf("\n");
    }

    public static void gyo2(int n, int number){
        if ( n == 1) {
            for (int a = 0; a < number ; a++) {
                System.out.printf(".#");
            }
            System.out.printf(".");
        } else {
            for (int a = 0; a < number; a++) {
                System.out.printf(".#");
            }
        }
        System.out.printf("\n");
    }


    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        while(true) {
            int H = input.nextInt();
            int W = input.nextInt();
            if (H == 0 && W == 0) {
                break;
            }
            int w2 = W % 2;
            for (int i = 0; i < H; i = i + 1) {
                if (i % 2 == 0) {
                    gyo1(w2, W / 2);
                    continue;
                }
                gyo2(w2, W / 2);
            }
            // }
            //第一行目の”＃. # .”

        }
    }




Compiler output:
Main.java:3: error: unnamed classes are a preview feature and are disabled by default.
    public static void gyo1(int w2, int number){
                  ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: Java

import java.util.Scanner;

public class main{
    public static void main(String args[]) {
        int i, j;
        Scanner sc = new Scanner(System.in);
        int h = sc.nextInt();
        int w = sc.nextInt();
        for (i = 0; i < h; i++) {
            if (i % 2 == 0) {
                for (j = 0; j < w; j++) {
                    if (j % 2 == 0) {
                        System.out.print("#");
                    } else {
                        System.out.print(".");
                    }
                }
                System.out.println();
            } else {
                for (j = 0; j < w; j++) {
                    if (j % 2 == 0) {
                        System.out.print(".");
                    } else {
                        System.out.print("#");
                    }
                }
                System.out.println();
            }
        }
        sc.close();
    }
}


Compiler output:
Main.java:3: error: class main is public, should be declared in a file named main.java
public class main{
       ^
1 error
Language: Java

import java.util.Scanner;

public class Test1 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		while (true) {
			int h = sc.nextInt();
			int 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 % 2 == 0) {
						if (j % 2 == 0) {
							System.out.print("#");
						} else {
							System.out.print(".");
						}
					} else {
						if (j % 2 == 0) {
							System.out.print(".");
						} else {
							System.out.print("#");
						}
					}
				}
				System.out.printf("\n");
			}
		}
	}

}


Compiler output:
Main.java:3: error: class Test1 is public, should be declared in a file named Test1.java
public class Test1 {
       ^
1 error
Language: Java

import java.util.Scanner;
public class CheckBoard {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    while (true) {
      int H = sc.nextInt();
      int W= sc.nextInt();

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

      for(int i=0; i < H; i++){
        if(i % 2 == 0){
          for(int j=0; j < W; j++){
            System.out.print(".");
            j++;
            System.out.print("#");
          }
        }
        if(i % 2 != 0){
          for(int j=0; j < W; j++){
            System.out.print("#");
            j++;
            System.out.print(".");
          }
        }
        System.out.print("\n");
      }
      System.out.printf("\n");
    }
  }
}



Compiler output:
Main.java:2: error: class CheckBoard is public, should be declared in a file named CheckBoard.java
public class CheckBoard {
       ^
1 error
Language: Java

2 5
5 2
3 5
5 3
6 4
4 6
8 8
8 7
7 8
9 9
9 11
11 19
1 2
2 1
1 3
3 1
1 4
4 1
1 10
10 1


Compiler output:
Main.java:1: error: class, interface, enum, or record expected
2 5
^
1 error
Language: Java

import java.util.Sanner;
 
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int h, w;
        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 % 2 == 0) {
                        if (j % 2 == 0) {
                            System.out.print("#");
                        } else {
                            System.out.print(".");
                        }
                    } else {
                        if (j % 2 == 0) {
                            System.out.print(".");
                        } else {
                            System.out.print("#");
                        }
                    }
                }
                System.out.println();
            }
            System.out.println();
        }
        sc.close();
    }
}


Compiler output:
Main.java:1: error: cannot find symbol
import java.util.Sanner;
                ^
  symbol:   class Sanner
  location: package java.util
Main.java:5: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:5: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
                         ^
  symbol:   class Scanner
  location: class Main
3 errors
Language: Java

import java.util.Scanner;
public class Main1{
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int H,W,i,j,l;
while(true){

H=scan.nextInt();
W=scan.nextInt();
if(H==0&&W==0){

  break;
}
for(j=0;j<H;j++){
if(j%2==0){
 for(i=0;i<W;i++){

  if(i % 2==0){
    System.out.print("#");
  }else if(i % 2!=0){
    System.out.print(".");

  }
}System.out.println("");
System.out.println("");

}else if(j%2==1){
for(l=0;l<W;l++){

 if(l % 2==0){
   System.out.print(".");
 }else if(l % 2!=0){
   System.out.print("#");
 }
}
  System.out.println("");
  System.out.println("");


}
}}
}
}



Compiler output:
Main.java:2: error: class Main1 is public, should be declared in a file named Main1.java
public class Main1{
       ^
1 error
Language: Java

import java.util.Scanner;

// AOJ problem

public class Main7 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int w, h;
		for(;;) {
			h = sc.nextInt();
			w = sc.nextInt();
			
			if(h == 0 && w == 0) {
				break;
			}
			for(int j = 0; j < h; j++) {
				for(int i = 0; i < w; i++) {
					if(j % 2 == 1) {
						if(i % 2 == 1) {
							System.out.print("#");
						} else {
							 System.out.print(".");
						}
					} else {
						if(i % 2 == 1) {
							System.out.print(".");
						} else {
							System.out.print("#");
						}
					}
				}
				System.out.print("\n");
			}
			System.out.print("\n");
		}
		sc.close();
	}
}


Compiler output:
Main.java:5: error: class Main7 is public, should be declared in a file named Main7.java
public class Main7 {
       ^
1 error
Language: Java

import java.util.ArrayList;
import java.util.Scanner;
public class Main{
    public static void main(String[] args) {
        Scanner input sc = new Scanner(System.in);
        ArrayList<String> inputWitdhHeights = new ArrayList<String>();
        while (true){
            String inputStrs = inputStr.nextLine();
            if ("0 0".equals(inputStrs)) {
                break;
            }
            inputWitdhHeights.add(inputStrs);
        }
        String space = " ";
        for (String inputNums: inputWitdhHeights) {
            showChessboard(inputNums.split(space));
            System.out.println();
        }
    }

    private static void showChessboard(String[] hw) {
        int h = Integer.parseInt(hw[0]);
        int w = Integer.parseInt(hw[1]);
        if(!isFormatNums(w, h)) {
            throw new NumberFormatException();
        }
        final String sharpStr = "#";
        final String dodStr   = ".";
        StringBuffer[] chessboardPattern = new StringBuffer[] {new StringBuffer(sharpStr), new StringBuffer(dodStr)};
        for(int j = 1; j < w; j++) {
            if (j % 2 == 0) {
                chessboardPattern[0].append(sharpStr);
                chessboardPattern[1].append(dodStr);
            } else {
                chessboardPattern[0].append(dodStr);
                chessboardPattern[1].append(sharpStr);
            }
        }
        for (int i = 0; i < h; i++) {
            System.out.println(chessboardPattern[i % 2]);
        }
    }

    private static boolean isFormatNums(int h, int w) {
        int minNum =   1;
        int maxNum = 300;
        return (minNum <= h && h <= maxNum) && (minNum <= w && w <= maxNum);
    }
}



Compiler output:
Main.java:5: error: ';' expected
        Scanner input sc = new Scanner(System.in);
                     ^
1 error
Language: Java

import java.util.ArrayList;
import java.util.Scanner;
public class Main{
    public static void main(String[] args) {
        Scanner input sc= new Scanner(System.in);
        ArrayList<String> inputWitdhHeights = new ArrayList<String>();
        while (true){
            String inputStrs = inputStr.nextLine();
            if ("0 0".equals(inputStrs)) {
                break;
            }
            inputWitdhHeights.add(inputStrs);
        }
        String space = " ";
        for (String inputNums: inputWitdhHeights) {
            showChessboard(inputNums.split(space));
            System.out.println();
        }
    }

    private static void showChessboard(String[] hw) {
        int h = Integer.parseInt(hw[0]);
        int w = Integer.parseInt(hw[1]);
        if(!isFormatNums(w, h)) {
            throw new NumberFormatException();
        }
        final String sharpStr = "#";
        final String dodStr   = ".";
        StringBuffer[] chessboardPattern = new StringBuffer[] {new StringBuffer(sharpStr), new StringBuffer(dodStr)};
        for(int j = 1; j < w; j++) {
            if (j % 2 == 0) {
                chessboardPattern[0].append(sharpStr);
                chessboardPattern[1].append(dodStr);
            } else {
                chessboardPattern[0].append(dodStr);
                chessboardPattern[1].append(sharpStr);
            }
        }
        for (int i = 0; i < h; i++) {
            System.out.println(chessboardPattern[i % 2]);
        }
    }

    private static boolean isFormatNums(int h, int w) {
        int minNum =   1;
        int maxNum = 300;
        return (minNum <= h && h <= maxNum) && (minNum <= w && w <= maxNum);
    }
}



Compiler output:
Main.java:5: error: ';' expected
        Scanner input sc= new Scanner(System.in);
                     ^
1 error
Language: Java

import java.util.ArrayList;
import java.util.Scanner;
public class MyClass {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        ArrayList<String> inputWitdhHeights = new ArrayList<String>();
        while (true){
            String inputStrs = inputStr.nextLine();
            if ("0 0".equals(inputStrs)) {
                break;
            }
            inputWitdhHeights.add(inputStrs);
        }
        String space = " ";
        for (String inputNums: inputWitdhHeights) {
            showChessboard(inputNums.split(space));
            System.out.println();
        }
    }

    private static void showChessboard(String[] hw) {
        int h = Integer.parseInt(hw[0]);
        int w = Integer.parseInt(hw[1]);
        if(!isFormatNums(w, h)) {
            throw new NumberFormatException();
        }
        final String sharpStr = "#";
        final String dodStr   = ".";
        StringBuffer[] chessboardPattern = new StringBuffer[] {new StringBuffer(sharpStr), new StringBuffer(dodStr)};
        for(int j = 1; j < w; j++) {
            if (j % 2 == 0) {
                chessboardPattern[0].append(sharpStr);
                chessboardPattern[1].append(dodStr);
            } else {
                chessboardPattern[0].append(dodStr);
                chessboardPattern[1].append(sharpStr);
            }
        }
        for (int i = 0; i < h; i++) {
            System.out.println(chessboardPattern[i % 2]);
        }
    }

    private static boolean isFormatNums(int h, int w) {
        int minNum =   1;
        int maxNum = 300;
        return (minNum <= h && h <= maxNum) && (minNum <= w && w <= maxNum);
    }
}



Compiler output:
Main.java:3: error: class MyClass is public, should be declared in a file named MyClass.java
public class MyClass {
       ^
Main.java:8: error: cannot find symbol
            String inputStrs = inputStr.nextLine();
                               ^
  symbol:   variable inputStr
  location: class MyClass
2 errors
Language: Java

import java.util.ArrayList;
import java.util.Scanner;
public class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        ArrayList<String> inputWitdhHeights = new ArrayList<String>();
        while (true){
            String inputStrs = inputStr.nextLine();
            if ("0 0".equals(inputStrs)) {
                break;
            }
            inputWitdhHeights.add(inputStrs);
        }
        String space = " ";
        for (String inputNums: inputWitdhHeights) {
            showChessboard(inputNums.split(space));
            System.out.println();
        }
    }

    private static void showChessboard(String[] hw) {
        int h = Integer.parseInt(hw[0]);
        int w = Integer.parseInt(hw[1]);
        if(!isFormatNums(w, h)) {
            throw new NumberFormatException();
        }
        final String sharpStr = "#";
        final String dodStr   = ".";
        StringBuffer[] chessboardPattern = new StringBuffer[] {new StringBuffer(sharpStr), new StringBuffer(dodStr)};
        for(int j = 1; j < w; j++) {
            if (j % 2 == 0) {
                chessboardPattern[0].append(sharpStr);
                chessboardPattern[1].append(dodStr);
            } else {
                chessboardPattern[0].append(dodStr);
                chessboardPattern[1].append(sharpStr);
            }
        }
        for (int i = 0; i < h; i++) {
            System.out.println(chessboardPattern[i % 2]);
        }
    }

    private static boolean isFormatNums(int h, int w) {
        int minNum =   1;
        int maxNum = 300;
        return (minNum <= h && h <= maxNum) && (minNum <= w && w <= maxNum);
    }
}



Compiler output:
Main.java:8: error: cannot find symbol
            String inputStrs = inputStr.nextLine();
                               ^
  symbol:   variable inputStr
  location: class Main
1 error
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String s=br.readLine();
		String[] st=s.split(" ");
		for(;;){
			int a=Integer.parseInt(st[0]);
			int b=Integer.parseInt(st[1]);
			if(a==0&&b==0)break;
			for(int i=1;i<=a;i++){
				if(i%2==1){System.out.print("#");}
				for(int l=1;l<b;l++){
					if(l%2==1)System.out.print(".");
					else System.out.print("#");
					
				}
				if(i%2==0) System.out.println(".");
				else System.out.println();
			}System.out.println();
		}
		javascript:void(0)

	}
}

Compiler output:
Main.java:25: error: illegal start of expression
		javascript:void(0)
		           ^
Main.java:25: error: ';' expected
		javascript:void(0)
		               ^
2 errors