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

import java.util.*;

class Main{
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);

    int h = scan.nextInt();
    int w = scan.nextInt();

    while(h != 0 || w != 0){
      StringBuilder sd = new StringBuilder();
      for (int j = 0 ;j <h;j++  ) {
          for (int i = 0;i < w ;i++ ) {
              if (i==0 || i==w-1 || j==0 || j==h-1) {
                  sd.append("#");
              }else{
                sd.append(".");
              }
          }
          sd.append("\n");
      }
      System.out.println(sd);
      h, w = scan.nextInt();
    }
  }
}

Compiler output:
Main.java:23: error: not a statement
      h, w = scan.nextInt();
      ^
Main.java:23: error: ';' expected
      h, w = scan.nextInt();
       ^
2 errors
Language: Java

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

class main {
     public static void main(String[] args) {
         StringBuilder sb = new StringBuilder();
         BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

         while(true) {
             String str[] = br.readLine().split(" ");
             int h = Integer.parseInt(str[0]);
             int w = Integer.parseInt(str[1]);
             
             if (h==0&&w==0) break;
             for (int i=0; i<h; i++) {
                 for (int j=0; j<w; j++) {
                     if (i == 0 || i == (i-1)) sb.append("#");
                     else if (j == 0 || j == (w-1)) sb.append("#");
                     else sb.append (".");
                 }
                 sb.append("\n");
             }
             sb.append("\n");
         }
     }
}
             

Compiler output:
Main.java:11: error: unreported exception IOException; must be caught or declared to be thrown
             String str[] = br.readLine().split(" ");
                                       ^
1 error
Language: Java

import java.util.Scanner;

public class printFrame {

	public static void main(String[] args) {
		Scanner stdin = new Scanner(System.in);
		int arr[][] = new int[300][2];
		int i = 0, j = 0, count = 0;
		for (i = 0; i < 300; i++) {
			arr[i][0] = stdin.nextInt();
			arr[i][1] = stdin.nextInt();
			if (arr[i][0] == 0 && arr[i][1] == 0) {
				count = i;
				break;
			}
		}
		for (int k = 0; k < count; k++) {
			int row = arr[k][0];
			int col = arr[k][1];
			for (i = 0; i < row; i++) {
				
				for (j = 0; j < col; j++) {
					if (i==0 || i==row-1  || j==0 || j==col-1) {
						System.out.print("#");
					}else {
						System.out.print(".");
					}
				}
				System.out.println();
			}
			System.out.println();
		}
	}
}

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

import java.util.Scanner;

public class printFrame {

	public static void main(String[] args) {
		Scanner stdin = new Scanner(System.in);
		int arr[][] = new int[300][2];
		int i = 0, j = 0, count = 0;
		for (i = 0; i < 300; i++) {
			arr[i][0] = stdin.nextInt();
			arr[i][1] = stdin.nextInt();
			if (arr[i][0] == 0 && arr[i][1] == 0) {
				count = i;
				break;
			}
		}
		for (int k = 0; k < count; k++) {
			int row = arr[k][0];
			int col = arr[k][1];
			for (i = 0; i < row; i++) {
				
				for (j = 0; j < col; j++) {
					if (i==0 || i==row-1  || j==0 || j==col-1) {
						System.out.print("#");
					}else {
						System.out.print(".");
					}
				}
				System.out.print("\n");
			}
			System.out.print("\n");
		}
	}
}

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

public class Main {

	public static void main(String[] args) {
		Scanner stdin = new Scanner(System.in);
		int arr[][] = new int[300][2];
		int i = 0, j = 0, count = 0;
		for (i = 0; i < 300; i++) {
			arr[i][0] = stdin.nextInt();
			arr[i][1] = stdin.nextInt();
			if (arr[i][0] == 0 && arr[i][1] == 0) {
				count = i;
				break;
			}
		}
		for (int k = 0; k < count; k++) {
			int row = arr[k][0];
			int col = arr[k][1];
			for (i = 0; i < row; i++) {				
				for (j = 0; j < col; j++) {
					if (i==0 || i==row-1  || j==0 || j==col-1) {
						System.out.print("#");
					}else {
						System.out.print(".");
					}
				}
				System.out.print("\n");
			}
			System.out.print("\n");
		}
	}
}

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

import java.util.*;

class Main{
	public static void main(String args[]){
		Scanner sc =new Scanner(System,in);
		String[] input;
		
		while(true){
			input=sc.nextLine().split(" ");
			int H = Integer.parseInt(input[0]);
			int W = Integer.parseInt(input[1]);
			if(H==0 && W==0){
				break;
			}
			for(int in1=0;in1<H;in1++){
				for(int in2 =0; in2<W; in2++){
					if(in1==0 || in1==H-1 || in2==0 || in2==W-1){
						System.out.print("#");
					}else{
						System.out.print(".");
					}
				}
			}
		}
	}
}

Compiler output:
Main.java:5: error: cannot find symbol
		Scanner sc =new Scanner(System,in);
		                        ^
  symbol:   variable System
  location: class Main
Main.java:5: error: cannot find symbol
		Scanner sc =new Scanner(System,in);
		                               ^
  symbol:   variable in
  location: class Main
2 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();
            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.println();
            }
            System.out.println();
        }
    }
}


Compiler output:
Main.java:18: error: ';' expected
                        System.out.print('#')
                                             ^
1 error
Language: Java

import java.util.Scanner;
public class Main1 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int H = scan.nextInt();
        int W = scan.nextInt();
        int w = 0;
        int h = 0;
        while(H != 0 && W != 0){
            while(h < H){
                while(w < W){
                    if(h ==0 || h == (H -1)){
                        System.out.println("#");
                    }
                    else{
                        if(w == 0|| w == (W -1)){
                            System.out.println("#");
                        }
                        else{
                            System.out.println(".");
                        }
                    }
                    w++;
                }
                h++;
            }
            w = 0;
            h = 0;
            H = scan.nextInt();
            W = scan.nextInt();
        }
    }
}


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;

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();
			if (H == 0 && W == 0) {
				break;
			} else {
				for (int i = 0; i < H; ++i) {
					for (int j = 0; j < W; ++j) {
						if (i == 0 || j == 0 || j == W - 1 || i == H -  {
							System.out.print("#");
						} else {
							System.out.print(".");
						}
					}
					System.out.print("\n");
				}
			}
		}
		sc.close();
	}
}


Compiler output:
Main.java:14: error: illegal start of expression
						if (i == 0 || j == 0 || j == W - 1 || i == H -  {
						                                                ^
1 error
Language: Java

import java.util.Scanner;
public class practice{
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        boolean can=true;

        while(can){
            int H=sc.nextInt();
            int W=sc.nextInt();
            if((H==0)&&(W==0)) can=false;
            else {
                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.println();
                }
                System.out.println();
            }
        }
    }
}


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

import java.io.*;
import java.util.Scanner;

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();
            int k,l;
            for(k=1;k<=W;k++){
                System.out.print("#");
            }
            System.out.print("\n");
            for(l=1;l<=H-2;l++){
                System.out.print("#");
                for(k=1;k<=W-2;k++){
                    System.out.print(".");
                }
                System.out.print("#");
                System.out.print("\n");
            }
            for(k=1;k<=W;k++){
                System.out.print("#");
            }
            System.out.print("\n");
            }
    }
}


Compiler output:
Main.java:4: error: illegal character: '\u3000'
public class?Main{
            ^
1 error
Language: Java

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int i = 0;
        while(i++ < 1000) {
            int H = sc.nextInt();
            int W = sc.nextInt();
            if(H < 3 || W < 3) break;
            for(int j=0; j<H; j++) {
                for(int k=0; k<W; k++) {
                    if(j == 0 || j == H-1) System.out.printf("#");
                    else if(k == 0 || k == W-1) System.out.printf("#");
                    else System.out.printf(".");
                }
                System.out.println();
            }
            System.out.println();
        }
    }
}



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: Java

import java.io.*;

public class Frame{
    public static void main(String[] args){
        int H,W;
        String line;

        BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));

        try{
            while(true){
                line=reader.readLine();
                H=Integer.parseInt(line);
                line=reader.readLine();
                W=Integer.parseInt(line);

                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){
                            System.out.print("#");
                        }
                        else{
                            if(j==0||j==W-1){
                                System.out.print("#");
                            }
                            else{
                                System.out.print(".");
                            }
                        }
                    }
                    System.out.println();
                }
            }
        }
        catch(IOException e){
            System.out.println(e);
        }
        catch(NumberFormatException e){
            System.out.println(e);
        }
    }
}


Compiler output:
Main.java:3: error: class Frame is public, should be declared in a file named Frame.java
public class Frame{
       ^
1 error
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();
            if(H==0 && W==0){
                break;
            }

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


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

import java.util.Scanner;

Class Main {
public static void main(String[] args) {

while(true) {

int h = inp.nextInt();
int w = inp.nextInt();
if (h==0&&w==0)
break;
else {
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==(h-1))
System.out.print('#');
else
System.out.print('.');
}
System.out.println();
}
}

}
}
}


Compiler output:
Main.java:3: error: class, interface, enum, or record expected
Class Main {
^
Main.java:4: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args) {
              ^
  (use --enable-preview to enable unnamed classes)
Main.java:30: error: class, interface, enum, or record expected
}
^
3 errors
Language: Java

import java.util.Scanner;

Class Main {
public static void main(String[] args) {
Scanner inp = new Scanner(System.in);

while(true) {

int h = inp.nextInt();
int w = inp.nextInt();
if (h==0&&w==0)
break;
else {
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==(h-1))
System.out.print('#');
else
System.out.print('.');
}
System.out.println();
}
}

}
}
}


Compiler output:
Main.java:3: error: class, interface, enum, or record expected
Class Main {
^
Main.java:4: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args) {
              ^
  (use --enable-preview to enable unnamed classes)
Main.java:31: error: class, interface, enum, or record expected
}
^
3 errors
Language: Java

import java.util.Scanner;

public class Main{

	public static void main(String[] args) {
	    Scanner sc = new Scanner(System.in);
		int x,y,i,j;
		
		while(true){
			x = sc.nextInt();
			y = sc.nextInt();
			if(x == 0 && y == 0){
				sc.close();
				return;
			}
			else{
				for(i=0;i<x;i++){
				    if(i==0 || i==(x-1)){
				    	for(j=0;j<y;j++){
				    		System.out.print('#');
				    	}
				    }
				    else{
				        if(j==0 || j==y){
				            System.out.print('#');
				        }
				        else{
				            System.out.print('.');
				        }
				    }
				    System.out.println();
				}
				System.out.println();
			}
		}
	}

}


Compiler output:
Main.java:24: error: variable j might not have been initialized
				        if(j==0 || j==y){
				           ^
1 error
Language: Java

import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int h,w,i,a,b,c,d;

		for(i=0;i<=1;){
			h = sc.nextInt(); w = sc.nextInt();
			if(h<=0){
				if(w<=0){
					i =2;
				}
			}
				for(b=0;b<w;b++){
					System.out.print("#");
				}System.out.println("");
				for(b=0;b<w;b++){
					System.out.print("#");
					for(b=2;b<w;b++){
						System.out.print(".");
					}
					System.out.print("#");
				}System.out.println("");
				for(b=0;b<w;b++){
					System.out.print("#");
				}
				System.out.println("");
				System.out.println("");
				if(i!=0){
					break;
				}
			}
			System.out.println("");
			sc.close();
		}
	


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

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

		for(i=0;i<=1;){
			h = sc.nextInt(); w = sc.nextInt();
			if(h<=0){
				if(w<=0){
					i =2;
				}
			}
				for(b=0;b<w;b++){
					System.out.print("#");
				}System.out.println("");
				for(b=0;b<w;b++){
					System.out.print("#");
					for(b=2;b<w;b++){
						System.out.print(".");
					}
					System.out.print("#");
				}System.out.println("");
				for(b=0;b<w;b++){
					System.out.print("#");
				}
				if(i!=0){
					break;
				}
				System.out.println("");
				System.out.println("");
			}
			System.out.println("");
			sc.close();
		}
	}


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

import java.util.Scanner;
public class Main02 {
	public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
	int h,w,i,a,b;

	for(i=0;i<=1;){
		h = sc.nextInt(); w = sc.nextInt();
		if(h<=0){
			if(w<=0){
				i =2;
			}
		}
			for(b=0;b<w;b++){
				System.out.print("#");
			}System.out.println("");
			for(a=2;a<h;a++){
				for(b=0;b<w;b++){
					System.out.print("#");
					for(b=2;b<w;b++){
						System.out.print(".");
					}
					System.out.print("#");
					System.out.println("");
			}
			}
			for(b=0;b<w;b++){
				System.out.print("#");
			}
			System.out.println("");
			System.out.println("");
			if(i!=0)
				break;
			
		}
		System.out.println("");
		sc.close();
	}
}


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

import java.util.Scanner;
class Main{
 public static void main(String args[]){
  int h,w,i,j,p;
  Scanner sc = new Scanner(System.in);
  while(true){
   h=sc.nextInt();
   w=sc.nextInt();
   if(h==0 && w==0)
    break;
   for(i=0;i<h;i++){
    if(i==0 || i==h-1){
     for(j=0;j<w;j++)
      System.out.print("#");
     System.out.println("");}
    else{
     System.out.print("#");
     for(p=0;p<w-2;p++)
      System.out.print(".");
     System.out.println("#");}
   System.out.println();}
 }
}


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

import java.util.Scanner;

class Main{
  private static int H,W;

  public static void main(String[] args){
    
    Scanner s= new Scanner(System.in);
   
   while(true){
   H=s.nextInt();
   W=s.nextInt();
   
   if(H==0&&W==0){
       break;
   }
   for(int i = 0;i<H;i++){
       
       for(int x=0;x<W;x++){
           
          if(i==0||I==H-1){
               System.out.println("#");
           }if(x==0||x<W-1){
               System.out.println("#");
               
       }else{
            System.out.println(".");
       }
           
       }
       System.out.println(" ");
       
   }System.out.println(" ");
   
  }
  }   
      
  }


Compiler output:
Main.java:21: error: cannot find symbol
          if(i==0||I==H-1){
                   ^
  symbol:   variable I
  location: class Main
1 error
Language: Java

import java.util.Scanner;

class Main{
  private static int H,W;

  public static void main(String[] args){
    
    Scanner s= new Scanner(System.in);
   
   while(true){
   H=s.nextInt();
   W=s.nextInt();
   
   if(H==0&&W==0){
       break;
   }
   for(int i = 0;i<H;i++){
       
       for(int x=0;x<W;x++){
           
         if(i=0||i==H-1){

 System.out.println("#");
}else{

if(x==0||x<W-1){
 System.out.println("#");
}else{ System.out.println(".");   }
}

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


Compiler output:
Main.java:21: error: bad operand types for binary operator '||'
         if(i=0||i==H-1){
               ^
  first type:  int
  second type: boolean
Main.java:21: error: incompatible types: int cannot be converted to boolean
         if(i=0||i==H-1){
             ^
2 errors
Language: Java

import java.util.Scanner;

class Main{
  private static int H,W;

  public static void main(String[] args){
    
    Scanner s= new Scanner(System.in);
   
   while(true){
   H=4;
   W=6;
   
   if(H==0&&W==0){
       break;
   }
   for(int i = 0;i<H;i++){
       
       for(int x=0;x<W;x++){
           
          if(i==0||i==H-1){
               System.out.println("#");
           }else
           
           {if(x==0||x<W-1){
               System.out.println("#");
               
       }else{
            System.out.println(".");
       }
           
       }
       System.out.println(" ");
       
   }System.out.println(" ");
   
  }
  }   
  }  
  


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


import java.util.Scanner;

class Main{
  private static int H,W;

  public static void main(String[] args){
    
    Scanner s= new Scanner(System.in);
   
   while(true){
   H=s.nextInt();
   W=s.nextgInt();
   
   if(H==0&&W==0){
       break;
   }
   for(int i = 0;i<H;i++){
       
       for(int x=0;x<W;x++){
           
          if(i==0||i==H-1){
               System.out.print("#");
           }else
           
           {if(x==0||x<W-1){
               System.out.print("#");
               
       }else{
            System.out.print(".");
       }
           }
       }
       System.out.println("");
       
   }System.out.println("");
   
  }
  }   
  
  }


Compiler output:
Main.java:13: error: cannot find symbol
   W=s.nextgInt();
      ^
  symbol:   method nextgInt()
  location: variable s of type Scanner
1 error
Language: Java

public class Main {
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		while (s.hasNextInt()) {
			int h = s.nextInt();
			int w = s.nextInt();
			if (h == 0 && w == 0) return;
			for (int i = 0; i < h; i++) {
				for (int j = 0; j < w; j++) {
					System.out.print((0 < i && i < h - 1) && (0 < j && j < w - 1) ? '.' : '#');
				}
				System.out.println();
			}
			System.out.println();
		}
	}
}

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

#include <stdio.h>

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


Compiler output:
main.c: In function 'main':
main.c:9:21: error: 'W' undeclared (first use in this function)
    9 |         for(i=1; i<=W; i++){
      |                     ^
main.c:9:21: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

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


Compiler output:
main.c: In function 'main':
main.c:11:27: error: 'a' undeclared (first use in this function)
   11 |                 if(i>1&&i<a&&j<b&&j>1){
      |                           ^
main.c:11:27: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:32: error: 'b' undeclared (first use in this function)
   11 |                 if(i>1&&i<a&&j<b&&j>1){
      |                                ^
Language: C

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

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

           printf("\n");
          }
     return 0;
}



Compiler output:
main.c: In function 'main':
main.c:10:13: error: 'x' undeclared (first use in this function)
   10 |          if(x+y==0) break;
      |             ^
main.c:10:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:15: error: 'y' undeclared (first use in this function)
   10 |          if(x+y==0) break;
      |               ^
Language: C

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

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

           printf("\n");
          }
     return 0;
}



Compiler output:
main.c: In function 'main':
main.c:10:13: error: 'x' undeclared (first use in this function)
   10 |          if(x+y==0) break;
      |             ^
main.c:10:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:15: error: 'y' undeclared (first use in this function)
   10 |          if(x+y==0) break;
      |               ^
main.c:13:69: error: expected ';' before '}' token
   13 |                           if(i*j==0 || i+1==y || j+1==x){printf("#")
      |                                                                     ^
      |                                                                     ;
   14 |                           }else{ printf(".");
      |                           ~
Language: C

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

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

           printf("\n");
          }
     return 0;
}



Compiler output:
main.c: In function 'main':
main.c:13:45: error: 'y' undeclared (first use in this function)
   13 |                           if(i*j==0 || i+1==y || j+1==x){printf("#")
      |                                             ^
main.c:13:45: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:55: error: 'x' undeclared (first use in this function)
   13 |                           if(i*j==0 || i+1==y || j+1==x){printf("#")
      |                                                       ^
main.c:13:69: error: expected ';' before '}' token
   13 |                           if(i*j==0 || i+1==y || j+1==x){printf("#")
      |                                                                     ^
      |                                                                     ;
   14 |                           }else{ printf(".");
      |                           ~
Language: C

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

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

           printf("\n");
          }
     return 0;
}



Compiler output:
main.c: In function 'main':
main.c:13:69: error: expected ';' before '}' token
   13 |                           if(i*j==0 || i+1==h || j+1==w){printf("#")
      |                                                                     ^
      |                                                                     ;
   14 |                           }else{ printf(".");
      |                           ~
Language: C

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


Compiler output:
main.c: In function 'main':
main.c:19:8: warning: missing terminating " character
   19 | printf("\n\")
      |        ^
main.c:19:8: error: missing terminating " character
   19 | printf("\n\")
      |        ^~~~~~
main.c:20:1: error: expected expression before 'return'
   20 | return 0;
      | ^~~~~~
main.c:20:10: error: expected ';' before '}' token
   20 | return 0;
      |          ^
      |          ;
   21 | }
      | ~
Language: C

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


Compiler output:
main.c: In function 'main':
main.c:19:8: warning: missing terminating " character
   19 | printf("\n\");
      |        ^
main.c:19:8: error: missing terminating " character
   19 | printf("\n\");
      |        ^~~~~~~
main.c:20:1: error: expected expression before 'return'
   20 | return 0;
      | ^~~~~~
main.c:20:10: error: expected ';' before '}' token
   20 | return 0;
      |          ^
      |          ;
   21 | }
      | ~
Language: C

include<stdio.h>
int main(void)
{
	int H=1,W=1,i,j;

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


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

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


Compiler output:
main.c: In function 'main':
main.c:12:1: error: 'else' without a previous 'if'
   12 | else
      | ^~~~
Language: C

include <stdio.h>
int main(){
int i, j, H, W;
for (;;){
scanf("%d %d", &H, &W);
if (H == 0 && W == 0 ) break;
for ( i = 1; i < H+1; i++ ){
for ( j = 1; j < W+1; j++)
if ( j == 1 || j == W )
printf("#");
else
printf(".");
printf("\n");
}
printf("\n");
}
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(){
int i, j, H, W;
for (;;){
scanf("%d %d", &H, &W);
if (H == 0 && W == 0 ) break;
for ( i = 1; i < H+1; i++ ){
for ( j = 1; j < W+1; j++)
if ( j == 1 || j == W )
printf("#");
else
printf(".");
printf("\n");
}
printf("\n");
}
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(){
int i, j, H, W;
for (;;){
scanf("%d %d", &H, &W);
if (H == 0 && W == 0 ) break;
for ( i = 1; i < H+1; i++ ){
for ( j = 1; j < W+1; j++){
if ( j == 1 || j == W )
printf("#");
else
printf(".");
}
printf("\n");
}
printf("\n");
}
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(){
int i, j, H, W;
for (;;){
scanf("%d %d", &H, &W);
if (H == 0 && W == 0 ) break;
for ( i = 1; i < H+1; i++ ){
for ( j = 1; j < W+1; j++)
if ( j == 1 || j == W )
printf("#");
else
printf(".");
printf("\n");
}
}
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(){
int i, j, H, W;
for (;;){
scanf("%d %d", &H, &W);
if (H == 0 && W == 0 ) break;
for ( i = 1; i < H+1; i++ ){
for ( j = 1; j < W+1; j++)
if ( j == 1 || j == W || i == 1 || i == H )
printf("#");
else
printf(".");
printf("\n");
}
printf("\n");
}
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(){
int a,b,A,B;
while (1){
scanf ("%d %d",&a,&b);
if (a==0&&b==0){break;}
else if (a==1){for (B=0;B<b;B++){printf("#");}}
else {for (A=0;A<a;A++){putchar ('#');}putchar('\n');
      for(B=0;B<b-2;B++){
      printf("#");
      for(A=0;A<a-2){putchar('.');}
      putchar("#");
      putchar(\n);}
      for (A=0;A<a;A++){putchar ('#');}putchar('\n');}
return 0;
}


Compiler output:
main.c: In function 'main':
main.c:11:20: error: expected ';' before ')' token
   11 |       for(A=0;A<a-2){putchar('.');}
      |                    ^
      |                    ;
main.c:12:15: error: passing argument 1 of 'putchar' makes integer from pointer without a cast [-Wint-conversion]
   12 |       putchar("#");
      |               ^~~
      |               |
      |               char *
In file included from main.c:1:
/usr/include/stdio.h:618:25: note: expected 'int' but argument is of type 'char *'
  618 | extern int putchar (int __c);
      |                     ~~~~^~~
main.c:13:15: error: stray '\' in program
   13 |       putchar(\n);}
      |               ^
main.c:13:16: error: 'n' undeclared (first use in this function)
   13 |       putchar(\n);}
      |                ^
main.c:13:16: note: each undeclared identifier is reported only once for each function it appears in
main.c:16:1: error: expected declaration or statement at end of input
   16 | }
      | ^
Language: C

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


Compiler output:
main.c: In function 'main':
main.c:10:15: error: passing argument 1 of 'putchar' makes integer from pointer without a cast [-Wint-conversion]
   10 |       putchar("#");
      |               ^~~
      |               |
      |               char *
In file included from main.c:1:
/usr/include/stdio.h:618:25: note: expected 'int' but argument is of type 'char *'
  618 | extern int putchar (int __c);
      |                     ~~~~^~~
main.c:11:20: error: expected ';' before ')' token
   11 |       for(A=0;A<a-2){putchar('.');}
      |                    ^
      |                    ;
main.c:12:15: error: passing argument 1 of 'putchar' makes integer from pointer without a cast [-Wint-conversion]
   12 |       putchar("#");
      |               ^~~
      |               |
      |               char *
/usr/include/stdio.h:618:25: note: expected 'int' but argument is of type 'char *'
  618 | extern int putchar (int __c);
      |                     ~~~~^~~
main.c:13:15: error: stray '\' in program
   13 |       putchar(\n);}
      |               ^
main.c:13:16: error: 'n' undeclared (first use in this function)
   13 |       putchar(\n);}
      |                ^
main.c:13:16: note: each undeclared identifier is reported only once for each function it appears in
main.c:16:1: error: expected declaration or statement at end of input
   16 | }
      | ^
Language: C

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


Compiler output:
main.c: In function 'main':
main.c:7:42: error: passing argument 1 of 'putchar' makes integer from pointer without a cast [-Wint-conversion]
    7 | else if (a==1){for (B=0;B<b;B++){putchar("#");}}
      |                                          ^~~
      |                                          |
      |                                          char *
In file included from main.c:1:
/usr/include/stdio.h:618:25: note: expected 'int' but argument is of type 'char *'
  618 | extern int putchar (int __c);
      |                     ~~~~^~~
main.c:10:15: error: passing argument 1 of 'putchar' makes integer from pointer without a cast [-Wint-conversion]
   10 |       putchar("#");
      |               ^~~
      |               |
      |               char *
/usr/include/stdio.h:618:25: note: expected 'int' but argument is of type 'char *'
  618 | extern int putchar (int __c);
      |                     ~~~~^~~
main.c:11:20: error: expected ';' before ')' token
   11 |       for(A=0;A<a-2){putchar('.');}
      |                    ^
      |                    ;
main.c:12:15: error: passing argument 1 of 'putchar' makes integer from pointer without a cast [-Wint-conversion]
   12 |       putchar("#");
      |               ^~~
      |               |
      |               char *
/usr/include/stdio.h:618:25: note: expected 'int' but argument is of type 'char *'
  618 | extern int putchar (int __c);
      |                     ~~~~^~~
main.c:13:15: error: stray '\' in program
   13 |       putchar(\n);}
      |               ^
main.c:13:16: error: 'n' undeclared (first use in this function)
   13 |       putchar(\n);}
      |                ^
main.c:13:16: note: each undeclared identifier is reported only once for each function it appears in
main.c:16:1: error: expected declaration or statement at end of input
   16 | }
      | ^
Language: C

#include<stdio.h>
int main(){
int H,W,h,w;
while(1){
  scanf("%d%d",&H,&W);
  if(H == 0 && W == 0)break;
  for(w = 0;w < W;w++)putchar('#');
  putchar('\n')
  for(h = 2;h < H; h++){
    putchar('#');
    for(w = 2; w < W;w++)putchar('.');
    putchar('#');
    putchar('\n');}
  for(w = 0;w < W; w++)putchar('#');
  putchar('\n');
  putchar('\n');}
return 0;
}



Compiler output:
main.c: In function 'main':
main.c:8:16: error: expected ';' before 'for'
    8 |   putchar('\n')
      |                ^
      |                ;
    9 |   for(h = 2;h < H; h++){
      |   ~~~
Language: C

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


Compiler output:
main.c:2:1: error: expected identifier or '(' before '{' token
    2 | {
      | ^
Language: C

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


Compiler output:
main.c:2:1: error: expected identifier or '(' before '{' token
    2 | {
      | ^
Language: C

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


Compiler output:
main.c: In function 'main':
main.c:17:17: error: 'j' undeclared (first use in this function)
   17 |             if((j==0)||(j==(w-1))){
      |                 ^
main.c:17:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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


Compiler output:
main.c: In function 'main':
main.c:16:37: error: expected ')' before '{' token
   16 |          }else if((i!=0)&&(i!=(h-1)){
      |                  ~                  ^
      |                                     )
main.c:26:7: error: expected expression before '}' token
   26 |       }
      |       ^
Language: C

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


Compiler output:
main.c: In function 'main':
main.c:16:11: error: implicit declaration of function 'elseif' [-Wimplicit-function-declaration]
   16 |          }elseif(0<i&&i<(h-1)){
      |           ^~~~~~
main.c:16:31: error: expected ';' before '{' token
   16 |          }elseif(0<i&&i<(h-1)){
      |                               ^
      |                               ;
Language: C

#include <stdio.h>

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


Compiler output:
main.c: In function 'main':
main.c:5:22: error: 'm' undeclared (first use in this function)
    5 |     scanf("%d%d",&h,&m);
      |                      ^
main.c:5:22: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

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


Compiler output:
main.c: In function 'main':
main.c:15:22: error: 'm' undeclared (first use in this function)
   15 |     scanf("%d%d",&h,&m);
      |                      ^
main.c:15:22: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

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


Compiler output:
main.c: In function 'main':
main.c:5:5: error: implicit declaration of function 'While' [-Wimplicit-function-declaration]
    5 |     While(1){
      |     ^~~~~
main.c:5:13: error: expected ';' before '{' token
    5 |     While(1){
      |             ^
      |             ;
Language: C

#include <stdio.h>

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


Compiler output:
main.c: In function 'main':
main.c:9:23: error: 'o' undeclared (first use in this function)
    9 |             for(int j=o; j<W; j++){
      |                       ^
main.c:9:23: note: each undeclared identifier is reported only once for each function it appears in
main.c:12:13: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
   12 |             print("\n");
      |             ^~~~~
      |             printf
Language: C

#include <stdio.h>

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


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

#include<stdio.h>

int main()
{
    int a, b, i, j;
    
    while(1){
        scanf("%d%d", &a, &b);

	if(a ==0 && b ==0) break;
        
        for(j =1; j <=b;j++) printf("#");
        printf("\n");
        for(i =1; i <=a-2;i++){
	    printf("#");
            for(i=1;i <= b -2; i++)printf(".");
            printf("#\n");
            }
        for(j =1; j <=b;j++) printf("#");
        printf("\n");
	    }
        printf("\n");  
    }
    return 0;
}


Compiler output:
main.c:24:5: error: expected identifier or '(' before 'return'
   24 |     return 0;
      |     ^~~~~~
main.c:25:1: error: expected identifier or '(' before '}' token
   25 | }
      | ^
Language: C

#include<stdio.h>

int main()
{
    int a, b, i, j, k;
    
    while(1){
        scanf("%d%d", &a, &b);

	if(a ==0 && b ==0) break;
        
        for(j =1; j <=b;j++) printf("#");
        printf("\n");
        for(i =1; i <=a-2;i++){
	    printf("#");
            for(l=1;l <= b-2; l++)printf(".");
            printf("#\n");
            }
        for(k =1; k <=b;j++) printf("#");
        printf("\n");
    }
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:16:17: error: 'l' undeclared (first use in this function)
   16 |             for(l=1;l <= b-2; l++)printf(".");
      |                 ^
main.c:16:17: note: each undeclared identifier is reported only once for each function it appears in