criyle/codenet-compile-errors huggingface dataset:
Language: Java

public class Main {
	public static void main(String[] args) {
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		try {
			int i = 0, j = 0, m = 0, x, y;
			Scanner sc = new Scanner(System.in);
			while (true) {

				i = sc.nextInt();
				j = sc.nextInt();
				m = sc.nextInt();

				if ((i > 50 || j > 50 || m > 100) || (i == -1 || j == -1 || m == -1 - 1)) {
					break;
				} else {
					if (i == -1 || j == -1)
						System.out.println("F");
					else if ((i + j) >= 80)
						System.out.println("A");
					else if ((i + j) >= 65)
						System.out.println("B");
					else if ((i + j) >= 50)
						System.out.println("C");
					else if ((i + j) >= 30) {
						if (m >= 50)
							System.out.println("C");
						else
							System.out.println("D");
					} else
						System.out.println("F");
				}
			}
		} catch (Exception e) {
		}
	}
}

Compiler output:
Main.java:3: error: cannot find symbol
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		^
  symbol:   class BufferedReader
  location: class Main
Main.java:3: error: cannot find symbol
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		                            ^
  symbol:   class BufferedReader
  location: class Main
Main.java:3: error: cannot find symbol
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		                                               ^
  symbol:   class InputStreamReader
  location: class Main
Main.java:6: error: cannot find symbol
			Scanner sc = new Scanner(System.in);
			^
  symbol:   class Scanner
  location: class Main
Main.java:6: error: cannot find symbol
			Scanner sc = new Scanner(System.in);
			                 ^
  symbol:   class Scanner
  location: class Main
5 errors
Language: Java

import java.util.Scanner;

public class main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		while (true) {
			int H = sc.nextInt();
			int W = sc.nextInt();
			System.out.printf("\n");
			if (H == 0 && W == 0) {
				break;
			}

			for (int i = 1; i <= H; i++) {
			    if(i==1 || i==H){
				for (int j = 1; j <= W; j++) {
					System.out.printf("#");
				}
			    }else{
			        System.out.printf("#");
			        for(int j = 2;j<=W-1;j++){
			            System.out.printf(".");
			        }
			        System.out.printf("#");
			    }
				System.out.printf("\n");

			}
		}

	}
}

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 printframe{
    public static void main(String[] args){
	Scanner sc=new Scanner(System.in);
	int i;
	int j;

	while(true){
	   int H=sc.nextInt();
	   int W=sc.nextInt();
	   
	    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){	    
		      System.out.print("#"); 
		  }else{
		     System.out.print("??\");
		    
		  }
        

		}
	   System.out.print("\n"); 
	    }


	}
    }
}

Compiler output:
Main.java:20: error: unclosed string literal
		     System.out.print("??\");
		                      ^
1 error
Language: Java

import java.util.Scanner;
public class main{
    public static void main(String[] args){
	Scanner sc=new Scanner(System.in);
	int i;
	int j;

	while(true){
	   int H=sc.nextInt();
	   int W=sc.nextInt();
	   
	    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){	    
		      System.out.print("#"); 
		  }else{
		     System.out.print("??\");
		    
		  }
        

		}
	   System.out.print("\n"); 
	    }


	}
    }
}

Compiler output:
Main.java:20: error: unclosed string literal
		     System.out.print("??\");
		                      ^
1 error
Language: Java

import java.util.Scanner;
public class main{
    public static void main(String[] args){
	Scanner sc=new Scanner(System.in);
	int i;
	int j;

	while(true){
	   int H=sc.nextInt();
	   int W=sc.nextInt();
	   
	    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){	    
		      System.out.print("#"); 
		  }else{
		     System.out.print(".");
		    
		  }
        

		}
	   System.out.print("\n"); 
	    }


	}
    }
}

Compiler output:
Main.java:2: 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;
class Main{
  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 == 0 || i == h-1 || j == 0 || j == w-1) {
            System.out.print("#");
          }
          else {
            System.out.print("-");
        }
      System.out.print("\n");
      }
    System.out.println("");
    }
  }
}

Compiler output:
Main.java:24: error: reached end of file while parsing
}
 ^
1 error
Language: Java

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

public class PrintAFrame {
	public static void main(String[] args){
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		ArrayList<String> list = new ArrayList<String>();
		String str;
		int height,width;

		try{
			while(true){
				str = br.readLine();

				if(str.equals("0 0")){
					break;
				}

				list.add(str);

			}

			for(int i=0;i<list.size();i++){
				height = Integer.parseInt(list.get(i).substring(0, str.indexOf(" ")));
				width = Integer.parseInt(list.get(i).substring(str.indexOf(" ")+1, str.length()));

				System.out.println();

				if(height>=3 && width<=100){
					for(int j=0;j<height;j++){
						for(int k=0;k<width;k++){
							if(j==0 || j==height-1 || k==0 || k==width-1){
								System.out.print("#");
							}else{
								System.out.print(".");
							}
						}
						System.out.println();
					}
				}

				System.out.println();

			}
		}catch(IOException e){
			e.printStackTrace();
		}
	}
}

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

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

public class Main {
	public void draw(){
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] str;
		while(true){
			try {
				str = br.readLine().split(" ");
				int h = Integer.parseInt(str[0]);
				int w = Integer.parseInt(str[1]);
				
				if(h==0 && w==0){ break; }
				
				String[][] sq = new String[h][w];
				
				for(int i=0; i<h; i++){
					for(int j=0; j<w; j++){
						sq[i][j] = "#";
					}
				}
				for(int i=1; i<h-1; i++){
					for(int j=1; j<w-1; j++){
						sq[i][j] = ".";
					}
				}
				for(int i=0; i<h; i++){
					for(int j=0; j<w; j++){
						System.out.print(sq[i][j]);
					}
					System.out.println("");
				}
				System.out.println("");
				
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
	}
	public static void main(String[] args){
		new Main2().draw();
	}
}

Compiler output:
Main.java:43: error: cannot find symbol
		new Main2().draw();
		    ^
  symbol:   class Main2
  location: class Main
1 error
Language: Java

class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int h = sc.nextInt();
		int w = sc.nextInt();
		while(h != 0 && w != 0){
			for(int i = 0; i < h; i++){
				for(int j = 0; j < w; j++){
					if(i == 0 || i == h - 1){
						System.out.print("#");
					}else if(j == 0 || j == w - 1){
						System.out.print("#");
					}else{
						System.out.print(".");
					}
				}
				System.out.printf("\n");
			}
			System.out.printf("\n");
			h = sc.nextInt();
			w = sc.nextInt();
		}
	}
}

Compiler output:
Main.java:3: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C

#include<stdio.h>
int main(void)
{
int i, j;
for ( i = 0; i < 4; i++ ){
    for ( j = 0; j < 8; j++ ){
        if{
            printf(".");
        } else {
            printf("#");
        }
    }
    printf("\n");
}
}

Compiler output:
main.c: In function 'main':
main.c:7:11: error: expected '(' before '{' token
    7 |         if{
      |           ^
      |           (
Language: C

#include <stdio.h>
#include <stdbool.h>

int main(void)
{   
	int hei, wid; 	
	while (true) {
		scanf ("%d%d", &hei, &wid);
		if (hei == 0 && wid == 0) {
			break;
		} else {
		for (int a = 0; a < wid ; ++a) { //first line
			printf ("#");
		}
		printf("\n");
		for (a = 0; a < hei - 2 ; ++a) {
			for(a = 0; a < wid ; ++a) {
			if (a == 0 || a == wid - 1) {
				printf ("#");
			} else {
				printf(".");
			}
			}
			printf("\n");
		}
		for (a = 0; a < wid ; ++a) {  //last line
			printf ("#");
		}
		printf("\n\n");
		}
	}
    return 0;        
}

Compiler output:
main.c: In function 'main':
main.c:16:22: error: 'a' undeclared (first use in this function)
   16 |                 for (a = 0; a < hei - 2 ; ++a) {
      |                      ^
main.c:16:22: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
#include <stdbool.h>
 
int main(void)
{   
    int hei, wid;   
    while (true) {
        scanf ("%d%d", &hei, &wid);
        if (hei == 0 && wid == 0) {
            break;
        } else {
        for (int a = 0; a < wid ; ++a) { //first line
            printf ("#");
        }
        printf("\n");
        for (a = 0; a < hei - 2 ; ++a) {
            for(a = 0; a < wid ; ++a) {
            if (a == 0 || a == wid - 1) {
                printf ("#");
            } else {
                printf(".");
            }
            }
            printf("\n");
        }
        for (a = 0; a < wid ; ++a) {  //last line
            printf ("#");
        }
        printf("\n\n");
        }
    }
    return 0;        
}

Compiler output:
main.c: In function 'main':
main.c:16:14: error: 'a' undeclared (first use in this function)
   16 |         for (a = 0; a < hei - 2 ; ++a) {
      |              ^
main.c:16:14: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
#include <stdbool.h>
 
int main(void)
{   
    int hei, wid, a;   
    while (true) {
        scanf ("%d%d", &hei, &wid);
        if (hei == 0 && wid == 0) {
            break;
        } else {
        for (a = 0; a < wid ; ++a) { //first line
          for(int y = 0; y < wid  ; ++y)
	      if (y = 0 || y = wid - 1){
              printf ("#");
        }
        printf("\n");
        for (a = 0; a < hei - 2 ; ++a) {
            for(a = 0; a < wid ; ++a) {
            if (a == 0 || a == wid - 1) {
                printf ("#");
            } else {
                printf(".");
            }
            }
            printf("\n");
        }
        for (a = 0; a < wid ; ++a) {  //last line
            printf ("#");
        }
        printf("\n\n");
        }
    }
    return 0;        
}

Compiler output:
main.c: In function 'main':
main.c:14:30: error: lvalue required as left operand of assignment
   14 |               if (y = 0 || y = wid - 1){
      |                              ^
main.c:35:1: error: expected declaration or statement at end of input
   35 | }
      | ^
Language: C

#include <stdio.h>
#include <stdbool.h>

int main(void)
{
	int H, W;
	while(true) {
		scanf("%d %d", &H, &W);
		if( H == 0 && W == 0) {
			break;
		}
		for(int w1 = W ; w > 0; w--) {
			printf("#");
		}
		printf("\n");
		for(int h = H - 2; h > 0; h--) {
			printf("#");
			for(int w = W - 2; w > 0; w--) {
				printf(".");
			}
			printf("#\n");
		}
		for(int w2 = W ; w > 0; w--) {
			printf("#");
		}
		printf("\n");
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:34: error: 'w' undeclared (first use in this function)
   12 |                 for(int w1 = W ; w > 0; w--) {
      |                                  ^
main.c:12:34: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

Compiler output:
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
    2 | main(){
      | ^~~~
main.c: In function 'main':
main.c:18:1: error: expected declaration or statement at end of input
   18 | }
      | ^
Language: C

#include<stdio.h>
#include<math.h>
#include<stdlib.h>

int main( void )
{

        int h = 0;
        int i = 0,j = 0 ,k = 0;
        int w = 0;

        for(;;)
        {
                scanf("%d %d", &h, &w);

                if(h == 0 && w == 0)
                {
                        break;
                }

                for(j = 0; j < w; j++)
                {
                        printf("#");
                }
                printf("\n");

                for(i=0;i<h-2;i++)
                {
                        for(j = 0;j < w; j++)
                        {
                                if(j == 0 || j == w-1)
                                {
                                        printf("#");
                                }
                                else
                                {
                                        printf(".");
                                }
                        }

Compiler output:
main.c: In function 'main':
main.c:39:25: error: expected declaration or statement at end of input
   39 |                         }
      |                         ^
main.c:39:25: error: expected declaration or statement at end of input
main.c:39:25: error: expected declaration or statement at end of input
Language: C

#include<stdio.h>
#include<math.h>
#include<stdlib.h>

int main( void )
{

        int h = 0;
        int i = 0,j = 0;
        int w = 0;

        for(;;)
        {
                scanf("%d %d", &h, &w);

                if(h == 0 && w == 0)
                {
                        break;
                }

                for(j = 0; j < w; j++)
                {
                        printf("#");
                }
                printf("\n");

                for(i=0;i<h-2;i++)
                {
                        for(j = 0;j < w; j++)
                        {
                                if(j == 0 || j == w-1)
                                {
                                        printf("#");
                                }
                                else
                                {
                                        printf(".");
                                }
                        }
"10013.c" 52L, 783C

Compiler output:
main.c: In function 'main':
main.c:40:10: error: expected ';' before numeric constant
   40 | "10013.c" 52L, 783C
      |          ^~~~
      |          ;
main.c:40:16: error: invalid suffix "C" on integer constant
   40 | "10013.c" 52L, 783C
      |                ^~~~
main.c:40:1: error: expected declaration or statement at end of input
   40 | "10013.c" 52L, 783C
      | ^~~~~~~~~
main.c:40:1: error: expected declaration or statement at end of input
main.c:40:1: error: expected declaration or statement at end of input
Language: C

#include<stdio.h>
#include<math.h>
#include<stdlib.h>

int main( void )
{

        int h = 0;
        int i = 0,j = 0;
        int w = 0;

        for(;;)
        {
                scanf("%d %d", &h, &w);

                if(h == 0 && w == 0)
                {
                        break;
                }

                for(j = 0; j < w; j++)
                {
                        printf("#");
                }
                printf("\n");

                for(i=0;i<h-2;i++)
                {
                        for(j = 0;j < w; j++)
                        {
                                if(j == 0 || j == w-1)
                                {
                                        printf("#");
                                }
                                else
                                {
                                        printf(".");
                                 }
                          }
                          printf("\n");
                }

                for(j = 0; j < w; j++)
                {
                        printf("#");
                }
                printf("\n");
        }
        printf("\n");
        return 0;
}
                          }
                        }

Compiler output:
main.c:52:27: error: expected identifier or '(' before '}' token
   52 |                           }
      |                           ^
main.c:53:25: error: expected identifier or '(' before '}' token
   53 |                         }
      |                         ^
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:13:41: error: implicit declaration of function 'prinf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   13 |                                         prinf(".");
      |                                         ^~~~~
      |                                         printf
Language: C

#include<stdio.h>

void sharp(int x);

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

    scanf("%d %d", &H, &W);
    sharp(W);

    for(i = 1; i < (H - 1); i++, sharp(1)){
        for(j = 1; j < (W - 1); j++){
            printf(".");
        }
        sharp(1);
        printf("\n");
    }

    return 0;
}

void sharp(int x){
    int i;

    for(i = 0; i < x; i++){
        printf("#");
    }

Compiler output:
main.c: In function 'sharp':
main.c:27:5: error: expected declaration or statement at end of input
   27 |     }
      |     ^
Language: C

#include<stdio.h>
int main(void)
{
    int a[100][100]={0},b,c,i,j,k,y,z;
    for(;;)
    {
    scanf("%d",&b);
    scanf("%d",&c);
    y=b-1;
    z=c-1;
    if(b==0||c==0)
    break;
    for(i=0;i<b;i++)
    {
        for(j=0;j<c;j++)
        {
            a[i][j];
            if(i==0 || j==0 || i==b-1 || j==c-1)
            printf("#");
            else
            printf(".");
        }
    printf("\n");
    }
    printf("\n");
    }
    return 0;

Compiler output:
main.c: In function 'main':
main.c:27:5: error: expected declaration or statement at end of input
   27 |     return 0;
      |     ^~~~~~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:16:11: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
   16 |           print(".");
      |           ^~~~~
      |           printf
Language: C

#include <stdio.h>

int main(void)
{
	int H;
	int W;
	
	int i,j;
	
	do{
		scanf("%d %d",&H,&W);
		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");
		}
	}while(H!=0 && W!=0)
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:22:29: error: expected ';' before 'return'
   22 |         }while(H!=0 && W!=0)
      |                             ^
      |                             ;
   23 | 
   24 |         return 0;
      |         ~~~~~~
Language: C

#include<stdio.h>

int main(){

int h,w,i,j;

while(1){
scanf("%d %d",&h,&w);

for(i=0;i<h;i++){
    for(j=0;j<w;j++){
        if(j==0 || j==w-1)print(".");
        else{
            printf("#");}
    }
printf("\n");
}
printf("\n");
}

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:27: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
   12 |         if(j==0 || j==w-1)print(".");
      |                           ^~~~~
      |                           printf
Language: C

include <stdio.h>

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

Compiler output:
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include <stdio.h>
      |         ^
Language: C

        #include <stdio.h>

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

Compiler output:
main.c: In function 'main':
main.c:11:44: error: 'n' undeclared (first use in this function)
   11 |                          if( i == 1 || i ==n){
      |                                            ^
main.c:11:44: note: each undeclared identifier is reported only once for each function it appears in
main.c:23:1: error: expected declaration or statement at end of input
   23 | }
      | ^
Language: C

        #include <stdio.h>

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

Compiler output:
main.c: In function 'main':
main.c:23:1: error: expected declaration or statement at end of input
   23 | }
      | ^
Language: C

#include <stdio.h>

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

Compiler output:
main.c: In function 'main':
main.c:19:38: error: expected ';' before '}' token
   19 |                         printf("#\n")
      |                                      ^
      |                                      ;
   20 |                 }
      |                 ~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:23:1: error: expected declaration or statement at end of input
   23 | }
      | ^
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:10:21: error: lvalue required as left operand of assignment
   10 |         if(i==0 || i=h-1){
      |                     ^
main.c:16:27: error: expected ')' before ';' token
   16 |                    if(j==0; || j==w-1) putchar('#');
      |                      ~    ^
      |                           )
main.c:22:1: error: expected declaration or statement at end of input
   22 | }
      | ^
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:10:21: error: lvalue required as left operand of assignment
   10 |         if(i==0 || i=h-1){
      |                     ^
Language: C

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

Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main(){
      | ^~~~
main.c: In function 'main':
main.c:8:21: error: lvalue required as left operand of assignment
    8 |           if(i==0||i=h-1){
      |                     ^
main.c:24:1: error: expected declaration or statement at end of input
   24 | }
      | ^
Language: C

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

    return 0;
}

Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main(){
      | ^~~~
main.c: In function 'main':
main.c:24:1: error: expected declaration or statement at end of input
   24 | }
      | ^
main.c:24:1: error: expected declaration or statement at end of input
Language: C

#include <stdio.h>
int main (void)

{
	int i, j;
	int W, H;

	while(1) {
        scanf("%d %d", &W, &H);
	    if( H == 0 && W == 0 ){break;}

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

Compiler output:
main.c: In function 'main':
main.c:21:9: error: expected declaration or statement at end of input
   21 |         }
      |         ^
main.c:21:9: error: expected declaration or statement at end of input
Language: C

#include <stdio.h>

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

  while(1)
  {
    scanf("%d%d", &H, &W);

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

    for(i=0; i<H; i++)
    {
      printf("#");

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

        printf("#");
        printf("\n");
      }
    }

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:23:11: error: implicit declaration of function 'printg'; did you mean 'printf'? [-Wimplicit-function-declaration]
   23 |           printg(".");
      |           ^~~~~~
      |           printf
Language: C

#include<stdio.h>
main(){
  int H,W,a,b;
  while(1){
    scanf("%d %d",&H,&W);
    if(H == 0 && W == 0)break;
    for(a=0;a<H;a++){
      for(b=0;b<W;b++){
	if(a>0 && b>0 && a=H-- && b=W--){
	  printf(".");
	}
	else{
	  printf("#");
	}
      }
    }
  }
  return 0;
}

Compiler output:
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
    2 | main(){
      | ^~~~
main.c: In function 'main':
main.c:9:36: error: lvalue required as left operand of assignment
    9 |         if(a>0 && b>0 && a=H-- && b=W--){
      |                                    ^
Language: C


#include <stdio.h>

int main(int argc,const char * argv[]){
    int i,j,H,W;
    
    for(;;){
        scanf("%d %d",&H,&W);
        if(H==0 && W==0)break;
        for(i=0;i<H;i++){
            for(j=0;j<W;j++){
                if(W-1>j && 0<j && H-1>i && 0<i){
                    printf(".");
                }
                else{
                    printf("#");
                }
            }
            
            printf("\n");
        }
    
    }
   

Compiler output:
main.c: In function 'main':
main.c:23:5: error: expected declaration or statement at end of input
   23 |     }
      |     ^
Language: C

include<stdio.h>
main(){
  int H,W,a,b;
  while(1){
    scanf("%d %d",&H,&W);
    if(H==0 || W==0)break;
    for(a=0;a<H;a++){
      for(b=0;b<W;b++){
	if(a==0 || b==0 || a==H-1 || b==W-1){
	  printf("#");
	}
	else{
	  printf(".");
	}
      }
      printf("\n");
    }
    printf("\n");
  }
  return 0;
}
		   

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
Language: C++

#include<stdio.h>

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

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

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

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

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

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

#include <iostream>
using namespace std;

int main(void){

	int H, W;
	cin >> H >> W;
	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;
	}

}

Compiler output:
a.cc:11:41: error: stray '#' in program
   11 |                                 cout << #;
      |                                         ^
a.cc: In function 'int main()':
a.cc:11:42: error: expected primary-expression before ';' token
   11 |                                 cout << #;
      |                                          ^
Language: C++

#include<stdio.h>

int main(){

int w,h;

while(1){

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: invalid operands of types 'const char [6]' and 'int' to binary 'operator&'
    9 | scanf("%d %d"&w,&h);
      |       ~~~~~~~^~
      |       |       |
      |       |       int
      |       const char [6]
Language: C++

#include<cstdio>

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

Compiler output:
a.cc: In function 'int main()':
a.cc:18:29: error: expected ';' before 'scanf'
   18 |                 printf("\n")
      |                             ^
      |                             ;
   19 |                 scanf("%d %d", &h, &w);
      |                 ~~~~~
Language: C++

#include <stdio.h>

int main(void)
{
	int H, W;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:27: error: expected '(' before '{' token
   11 |                 } else if {
      |                           ^
      |                           (
a.cc:29:19: error: 'else' without a previous 'if'
   29 |                 } else {
      |                   ^~~~
Language: C++

#include <iostream>
using namespace std;

int main()
{
  int w, h;
  cin >> w >> h;
  while(w != 0 || h != 0) {
    for (int i = 0; i < w; i++)
      cout << "#";
    cout << endl;

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

    for (int i = 0; i < w; i++)
      cout << "#";
    cout << endl;

    cin >> w >> h;
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:19: error: expected ';' before 'i'
   13 |     for (int i = 0 i < h - 2; i++) {
      |                   ^~
      |                   ;
Language: C++

#include<stdio.h>
int main(){
  int n[265],s[265],i=0,z=0,a=0,j;
  char b='.',w='#';
  while(1){
    scanf("%d %d",&n[i],&s[i]);
    if(n[i]==0&&s[i]==0){
      break;
    }
    i++;
  }
  for(a=0;a<=i;a++){
    for(z=0;z<s[a];z++){
      printf("%c",w);
    }
    printf("\n");
    for(j=0;j<n[a]-2;j++){
      printf("%c",w);
      for(z=1;z<s[a]-1;z++){
	printf("%c",b);
      }
      printf("%c",w);
      printf("\n");
    }
      for(z=0;z<s[a];z++){
	printf("%c",w);
    }
    printf("\n \n");
  }
  retur

Compiler output:
a.cc: In function 'int main()':
a.cc:30:3: error: 'retur' was not declared in this scope
   30 |   retur
      |   ^~~~~
a.cc:30:8: error: expected '}' at end of input
   30 |   retur
      |        ^
a.cc:2:11: note: to match this '{'
    2 | int main(){
      |           ^
Language: C++

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

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

#include <iostream>

int main()
{
    while (true) {
        int height, width;
        std::cin >> height >> width;
        if (height * height + width * width == 0) {
            return;
        }
        if (width <= 0 || width > 300 ) {
            std::cout << "Error: The width should be at least 1." << std::endl;
        } else if (height < 3) {
            std::cout << "Error: Data input is wrong." << std::endl;
        }
        if (width == 1) {
            for (int i = 0; i < height; i++) {
                std::cout << "#" << std::endl;
            }
        } else {
            for (int i = 0; i < height; i++) {
                std:cout << "#";
            }
            std::cout << std::endl;
            for (int i = 0; i < height - 2; i++) {
                std::cout << "#";
                for (int j = 0; j < width - 2; j++) {
                    std::cout << ".";
                }
                std::cout << "#";
                std::endl;
            }
            for (int i = 0; i < height; i++) {
                std:cout << "#";
            }
            std::cout << std::endl;
        }
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: return-statement with no value, in function returning 'int' [-fpermissive]
    9 |             return;
      |             ^~~~~~
a.cc:22:21: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   22 |                 std:cout << "#";
      |                     ^~~~
      |                     std::cout
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:31:26: error: statement cannot resolve address of overloaded function
   31 |                 std::endl;
      |                          ^
a.cc:34:17: error: duplicate label 'std'
   34 |                 std:cout << "#";
      |                 ^~~
a.cc:34:21: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   34 |                 std:cout << "#";
      |                     ^~~~
      |                     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include <iostream>
 
int main()
{
    while (true) {
        int height, width;
        std::cin >> height >> width;
        if (height * height + width * width == 0) {
            return;
        }
        if (width <= 0 || width > 300 ) {
            std::cout << "Error: Invalid width." << std::endl;
        } else if (height < 3) {
            std::cout << "Error: Invalid height." << std::endl;
        }
        if (width == 1) {
            for (int i = 0; i < height; i++) {
                std::cout << "#" << std::endl;
            }
        } else {
            for (int i = 0; i < height; i++) {
                std::cout << "#";
            }
            std::cout << std::endl;
            for (int i = 0; i < height - 2; i++) {
                std::cout << "#";
                for (int j = 0; j < width - 2; j++) {
                    std::cout << ".";
                }
                std::cout << "#";
                std::endl;
            }
            for (int i = 0; i < height; i++) {
                std:cout << "#";
            }
            std::cout << std::endl;
        }
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: return-statement with no value, in function returning 'int' [-fpermissive]
    9 |             return;
      |             ^~~~~~
a.cc:31:26: error: statement cannot resolve address of overloaded function
   31 |                 std::endl;
      |                          ^
a.cc:34:21: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   34 |                 std:cout << "#";
      |                     ^~~~
      |                     std::cout
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include <iostream>
 
int main()
{
    while (true) {
        int height, width;
        std::cin >> height >> width;
        if (height * height + width * width == 0) {
            return;
        }
        if (width <= 0 || width > 300 ) {
            std::cout << "Error: The width should be at least 1." << std::endl;
        } else if (height < 3) {
            std::cout << "Error: Data input is wrong." << std::endl;
        }
        if (width == 1) {
            for (int i = 0; i < height; i++) {
                std::cout << "#" << std::endl;
            }
        } else {
            for (int i = 0; i < height; i++) {
                std::cout << "#";
            }
            std::cout << std::endl;
            for (int i = 0; i < height - 2; i++) {
                std::cout << "#";
                for (int j = 0; j < width - 2; j++) {
                    std::cout << ".";
                }
                std::cout << "#";
                std::endl;
            }
            for (int i = 0; i < height; i++) {
                std::cout << "#";
            }
            std::cout << std::endl;
        }
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: return-statement with no value, in function returning 'int' [-fpermissive]
    9 |             return;
      |             ^~~~~~
a.cc:31:26: error: statement cannot resolve address of overloaded function
   31 |                 std::endl;
      |                          ^
Language: C++

#include <iostream>
  
int main()
{
    while (true) {
        int height, width;
        std::cin >> height >> width;
        if (height * height + width * width == 0) {
            return;
        }
        if (width <= 0 || width > 300 ) {
            std::cout << "Error: The width should be at least 1." << std::endl;
        } else if (height < 3) {
            std::cout << "Error: Data input is wrong." << std::endl;
        }
        if (width == 1) {
            for (int i = 0; i < height; i++) {
                std::cout << "#" << std::endl;
            }
        } else {
            for (int i = 0; i < height; i++) {
                std::cout << "#";
            }
            std::cout << std::endl;
            for (int i = 0; i < height - 2; i++) {
                std::cout << "#";
                for (int j = 0; j < width - 2; j++) {
                    std::cout << ".";
                }
                std::cout << "#";
                std::cout << std::endl;
            }
            for (int i = 0; i < height; i++) {
                std::cout << "#";
            }
            std::cout << std::endl;
        }
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: return-statement with no value, in function returning 'int' [-fpermissive]
    9 |             return;
      |             ^~~~~~
Language: C++

include <iostream>

int main()
{
    while(true) {
        int H;
        int W;
        std::cin >> H >> W;
        if(H == 0 && W == 0) {
            break;
        }
        for(int i = 0; i < W; ++i) {
            std::cout << "#";
        }
        std::cout << std::endl;
        for(int i = 0; i < H - 2; ++i) {
            std::cout << "#";
            for(int j = 0; j < W - 2; ++j) {
                std::cout << ".";
            }
            std::cout << "#" << std::endl;
        }
        for(int i = 0; i < W; ++i) {
            std::cout << "#";
        }
        std::cout << std::endl;
        std::cout << std::endl;
    }
    return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
Language: C++

include <iostream>

int main ()
{
	int H;
	int W;
	while (true){
		std::cin >> H >> W;
		if (H == 0 && W == 0 ){
			break;
		}else{
			int i = 0;
			while (i < W - 1){
				std::cout << "#";
				++i;
			}
			std::cout << "#" << std::endl;
			int j = 0;
			while (j < H - 2) {
				std::cout << "#" ;
				int k = 0;
				while (k < W -2){
					std::cout << ".";
					++k;
				}
				std::cout << "#" << std::endl;
				++j;
			}
			int l = 0;
			while (l < W ){
				std::cout << "#";
				++l;
			}
		}
	std::cout << std::endl;
	std::cout << std::endl;
	}
	return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
Language: C++

include <iostream>

int main ()
{
	int H;
	int W;
	while (true){
		std::cin >> H >> W;
		if (H == 0 && W == 0 ){
			break;
		}else{
			int i = 0;
			while (i < W - 1){
				std::cout << "#";
				++i;
			}
			std::cout << "#" << std::endl;
			int j = 0;
			while (j < H - 2) {
				std::cout << "#" ;
				int k = 0;
				while (k < W -2){
					std::cout << ".";
					++k;
				}
				std::cout << "#" << std::endl;
				++j;
			}
			int l = 0;
			while (l < W ){
				std::cout << "#";
				++l;
			}
		}
	std::cout << std::endl;
	}
	return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
Language: C++

include <iostream>

int main ()
{
	int H;
	int W;
	while (true){
		std::cin >> H >> W;
		if (H == 0 && W == 0 ){
			break;
		}else{
			int i = 0;
			while (i < W - 1){
				std::cout << "#";
				++i;
			}
			std::cout << "#" << std::endl;
			int j = 0;
			while (j < H - 2) {
				std::cout << "#" ;
				int k = 0;
				while (k < W -2){
					std::cout << ".";
					++k;
				}
				std::cout << "#" << std::endl;
				++j;
			}
			int l = 0;
			while (l < W ){
				std::cout << "#";
				++l;
			}
	std::cout << std::end;
                }
	}
	return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
Language: C++

#include <iostream>

int main()
{
	int H, W, i, j;
	
	std::cin >> H >> W;
	while (H !== 0 || W !== 0) {
		for(i = 0; i < W -1; i++) {
			std::cout << "#";
		}
		std::cout << "#" << std::endl;
		for(i = 0; i < H - 2; i++) {
			std::cout << "#";
			for(j = 0; j < W - 2; j++) {
				std::cout << ".";
			}
			std::cout << "#";
		}
		for(i = 0; i < W -1; i++) {
			std::cout << "#";
		}
		std::cout << "#" << std::endl;
		std::cin >> H >> W;
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:20: error: expected primary-expression before '=' token
    8 |         while (H !== 0 || W !== 0) {
      |                    ^
a.cc:8:31: error: expected primary-expression before '=' token
    8 |         while (H !== 0 || W !== 0) {
      |                               ^