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

 import java.util.*;
public class Main {
	 public static void main(String[] args){
		         int i,j;
		         Scanner scan = new Scanner(System.in);
		         while(scan.hasNext()){
		         
		         int h = scan.nextInt();
		         int w = scan.nextInt();
???????????????????????????????????? if(h==0&&w==0) break;
		         for(i=0;i<h;i++){
		           for(j=0;j<w;j++){
		            System.out.printf("#");
		           }
		            System.out.println("\n");
		         
		   }
		         if(h==0&&w==0) break;
		  }
		           
		 }
		 }
	    

Compiler output:
a.cc:1:2: error: 'import' does not name a type
    1 |  import java.util.*;
      |  ^~~~~~
a.cc:1:2: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: expected unqualified-id before 'public'
    2 | public class Main {
      | ^~~~~~
Language: C++

 import java.util.*;
public class Main {
	 public static void main(String[] args){
		         int i,j;
		         Scanner scan = new Scanner(System.in);
		         while(scan.hasNext()){
		         
		         int h = scan.nextInt();
		         int w = scan.nextInt();
???????????????????????????????????? if(h==0&&w==0) break;
		         for(i=0;i<h;i++){
		           for(j=0;j<w;j++){
		            System.out.printf("#");
		           }
		            System.out.println("\n");
		         
		   }
		         
		  }
		           
		 }
		 }
	    

Compiler output:
a.cc:1:2: error: 'import' does not name a type
    1 |  import java.util.*;
      |  ^~~~~~
a.cc:1:2: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: expected unqualified-id before 'public'
    2 | public class Main {
      | ^~~~~~
Language: C++

#include<stdio.h>

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

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

inclde <iostream>
using namespace std;
int main()
  {int h,w,x;
   while(cin>>h>>w)
     {x=w;
      if(h==0&&w==0)break
      for(;h>=0;h--)
        {for(w=x;w>=0;w--)
           {if(w>0)
              {cout<<"#";}
            if(w==0)
              {cout<<endl;}
           }
        }
     }


  } 

Compiler output:
a.cc:1:1: error: 'inclde' does not name a type
    1 | inclde <iostream>
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:5:10: error: 'cin' was not declared in this scope
    5 |    while(cin>>h>>w)
      |          ^~~
a.cc:7:26: error: expected ';' before 'for'
    7 |       if(h==0&&w==0)break
      |                          ^
      |                          ;
    8 |       for(;h>=0;h--)
      |       ~~~                 
a.cc:11:16: error: 'cout' was not declared in this scope
   11 |               {cout<<"#";}
      |                ^~~~
a.cc:13:16: error: 'cout' was not declared in this scope
   13 |               {cout<<endl;}
      |                ^~~~
a.cc:13:22: error: 'endl' was not declared in this scope
   13 |               {cout<<endl;}
      |                      ^~~~
Language: C++

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

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

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:4:4: error: base operand of '->' is not a pointer
    4 |   H->1,W-<300;
      |    ^~
a.cc:4:6: error: expected unqualified-id before numeric constant
    4 |   H->1,W-<300;
      |      ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:16: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   11 |         printf('#');
      |                ^~~
      |                |
      |                char
In file included from a.cc:1:
/usr/include/stdio.h:363:43: note:   initializing argument 1 of 'int printf(const char*, ...)'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
Language: C++

import Control.Applicative
import Data.List

main = do
  inputs <- lines <$> getContents
  putStrLn
    $ intercalate "\n\n"
    $ fmap (\(h, w) -> to_rect h w)
    $ fmap tuplify2
    $ fmap (fmap (read :: String -> Int) . words)
    $ takeWhile (\s -> s /= "0 0")
    $ inputs

to_rect h w =
  intercalate "\n"
    $ take h
    $ repeat
    $ concat
    $ take w
    $ repeat "#"

tuplify2 [a, b] = (a, b)

Compiler output:
a.cc:8:13: error: stray '\' in program
    8 |     $ fmap (\(h, w) -> to_rect h w)
      |             ^
a.cc:11:18: error: stray '\' in program
   11 |     $ takeWhile (\s -> s /= "0 0")
      |                  ^
a.cc:1:1: error: 'import' does not name a type
    1 | import Control.Applicative
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

import java.util.Scanner;

class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int height = sc.nextInt();
    int wide = sc.nextInt();
    char c = '#';

    if(height == 0 || wide ==0){
      System.exit(1);
    }

    for(int i=0;i<height;i++){
      for(int j=0;j<wide;j++){
        System.out.print(c);
      }
    
    }
  }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:9: error: expected ':' before 'static'
    4 |   public static void main(String[] args){
      |         ^~~~~~~
      |         :
a.cc:4:27: error: 'String' has not been declared
    4 |   public static void main(String[] args){
      |                           ^~~~~~
a.cc:4:36: error: expected ',' or '...' before 'args'
    4 |   public static void main(String[] args){
      |                                    ^~~~
a.cc:21:2: error: expected ';' after class definition
   21 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:5:5: error: 'Scanner' was not declared in this scope
    5 |     Scanner sc = new Scanner(System.in);
      |     ^~~~~~~
a.cc:6:18: error: 'sc' was not declared in this scope
    6 |     int height = sc.nextInt();
      |                  ^~
a.cc:11:7: error: 'System' was not declared in this scope
   11 |       System.exit(1);
      |       ^~~~~~
a.cc:16:9: error: 'System' was not declared in this scope
   16 |         System.out.print(c);
      |         ^~~~~~
Language: C++

import java.util.Scanner;

class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int height = sc.nextInt();
    int wide = sc.nextInt();
    char c = '#';

    if(height == 0 || wide ==0){
      System.exit(1);
    }

    for(int i=0;i<height;i++){
      for(int j=0;j<wide;j++){
        System.out.print("c");
      }
      System.out.println("");
    }
  }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:9: error: expected ':' before 'static'
    4 |   public static void main(String[] args){
      |         ^~~~~~~
      |         :
a.cc:4:27: error: 'String' has not been declared
    4 |   public static void main(String[] args){
      |                           ^~~~~~
a.cc:4:36: error: expected ',' or '...' before 'args'
    4 |   public static void main(String[] args){
      |                                    ^~~~
a.cc:21:2: error: expected ';' after class definition
   21 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:5:5: error: 'Scanner' was not declared in this scope
    5 |     Scanner sc = new Scanner(System.in);
      |     ^~~~~~~
a.cc:6:18: error: 'sc' was not declared in this scope
    6 |     int height = sc.nextInt();
      |                  ^~
a.cc:11:7: error: 'System' was not declared in this scope
   11 |       System.exit(1);
      |       ^~~~~~
a.cc:16:9: error: 'System' was not declared in this scope
   16 |         System.out.print("c");
      |         ^~~~~~
a.cc:18:7: error: 'System' was not declared in this scope
   18 |       System.out.println("");
      |       ^~~~~~
Language: C++

import java.util.Scanner;
public class Teppei {
    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 x = 0; x < H; x++){
                for(int y = 0; y < W; y++){
                    System.out.print("#");
                }
                System.out.println();
}
        }
System.out.println();

    }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: expected unqualified-id before 'public'
    2 | public class Teppei {
      | ^~~~~~
Language: C++

import java.util.Scanner;
public class Teppei {
    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 x = 0; x < H; x++){
                for(int y = 0; y < W; y++){
                    System.out.print("#");
                }
                System.out.println();
}
        }

    }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: expected unqualified-id before 'public'
    2 | public class Teppei {
      | ^~~~~~
Language: C++

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 x = 0; x < H; x++){
                for(int y = 0; y < W; y++){
                    System.out.print("#");
                }
                System.out.println();
}
        }

    }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: expected unqualified-id before 'public'
    2 | public class Main {
      | ^~~~~~
Language: C++

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>

using namespace std;

int main() {
  
  int h,w;
  char buf[100];
  char* p;

  while(fgets(buf,sizeof(buf),stdin)!=NULL) {
    buf[strlen(buf)-1]='\0';

    p=strtok(buf," ");
    h=atoi(p);
    p=strtok(NULL," ");
    w=atoi(p);

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

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

#include <iostream>
//#include <cstdio>
#include <cstdlib>
#include <cstring>

using namespace std;

int main() {
  
  int h,w;
  char buf[100];
  char* p;

  while(fgets(buf,sizeof(buf),stdin)!=NULL) {
    buf[strlen(buf)-1]='\0';

    p=strtok(buf," ");
    h=atoi(p);
    p=strtok(NULL," ");
    w=atoi(p);

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

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

#include<cstdio>
int main(){int a,b,c;while(scanf("%d%d",&a,&b),a,c=a)while(a--||(printf("\n")&&b--&&a=c))printf("#");}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:83: error: lvalue required as left operand of assignment
    2 | int main(){int a,b,c;while(scanf("%d%d",&a,&b),a,c=a)while(a--||(printf("\n")&&b--&&a=c))printf("#");}
      |                                                                  ~~~~~~~~~~~~~~~~~^~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:4:80: error: expected '}' at end of input
    4 | for(int i=0;i<a;i++,printf("\n"))for(int j=0;j<b;j++)printf("#");printf("\n");}
      |                                                                                ^
a.cc:2:11: note: to match this '{'
    2 | int main(){
      |           ^
Language: C++

#include<stdio.h>

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

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

int main()
{
        int i,hight,width;
        int a[100],b[100];

        for(i=0;;i++)
        {
                scanf("%d %d",&a[i],&b[i]);
                if(a[i]==0&&b[i]==0)break;
                for(hight=0;hight<a[i];hight++)
                {

                        for(width=0;width<b[i];width++)
                        {
                                printf("#");
                        }
                        printf("\n");
                }
        printf("\n");
        }

        return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: 'scanf' was not declared in this scope
    8 |                 scanf("%d %d",&a[i],&b[i]);
      |                 ^~~~~
a.cc:15:33: error: 'printf' was not declared in this scope
   15 |                                 printf("#");
      |                                 ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main()
a.cc:17:25: error: 'printf' was not declared in this scope
   17 |                         printf("\n");
      |                         ^~~~~~
a.cc:17:25: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:19:9: error: 'printf' was not declared in this scope
   19 |         printf("\n");
      |         ^~~~~~
a.cc:19:9: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#include <stdio.h>

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

Compiler output:
a.cc: In function 'int main()':
a.cc:16:25: error: break statement not within loop or switch
   16 |                         break;
      |                         ^~~~~
a.cc: At global scope:
a.cc:28:9: error: expected unqualified-id before 'return'
   28 |         return (0);
      |         ^~~~~~
a.cc:29:1: error: expected declaration before '}' token
   29 | }
      | ^
Language: C++

#include<iostream>
using namespace std;

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

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

#include<iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:4: error: 'j' was not declared in this scope
    9 | if(j!=w-1)cout << endl;
      |    ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:4:5: error: 'scanf' was not declared in this scope
    4 |     scanf("%d %d",&H,&W);
      |     ^~~~~
a.cc:9:17: error: 'printf' was not declared in this scope
    9 |                 printf("#");
      |                 ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(){
a.cc:11:13: error: 'printf' was not declared in this scope
   11 |             printf("\n");
      |             ^~~~~~
a.cc:11:13: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:13:9: error: 'printf' was not declared in this scope
   13 |         printf("\n");
      |         ^~~~~~
a.cc:13:9: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#include<iostream>

using namespace std;

int main(){
	int h,w;
	cin>>w>>h;

while(1){
	if(h!=0){
	for(int j=0;j<w;j++){
		for(int i=0;i<h;i++){
			cout<<"#";
				}
			cout<<endl;
			}
		}
	if(h==0){
		if(w==0){goto end;}
		}
	cout<<endl;
	cin>>w>>h;
}
end:
return 0;
}
#include<iostream>

using namespace std;

int main(){
	int h,w;
	cin>>w>>h;

while(1){
	if(h!=0){
	for(int j=0;j<w;j++){
		for(int i=0;i<h;i++){
			cout<<"#";
				}
			cout<<endl;
			}
		}
	if(h==0){
		if(w==0){goto end;}
		}
	cout<<endl;
	cin>>w>>h;
}
end:
return 0;
}

Compiler output:
a.cc:31:5: error: redefinition of 'int main()'
   31 | int main(){
      |     ^~~~
a.cc:5:5: note: 'int main()' previously defined here
    5 | int main(){
      |     ^~~~
Language: C++

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

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

#include<iostream>
using namespace std;

int main(){
int h,w;
while(cin>>h>>w){
if(h==0 && w==0) break;
for(int y=0;y<h;y++){
for(int x=0;x<w;x++){
cout<<"#";
}
cout<<endl;
}
cout<<endl;
}

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: error: 'o' was not declared in this scope
    8 |         for(i=o;i<H;i++){
      |               ^
a.cc:14:21: error: expected ';' before '}' token
   14 |         cout << endl
      |                     ^
      |                     ;
   15 | }
      | ~
Language: C++

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <cmath>
#include <cstdlib>
#include <stack>
#include <queue>
#include <numeric>
#include <ctime>
using namespace std;

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

	return 0;
}

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

#include <iostream>
#include <vector>

using namespace std;

int main()
{
    int height, width;
    for (;;) {
	cin >> height >> width;
	if (height == 0 && width == 0)
	    return 0;
	for (int i = 0; i < height; ++i) {
	    for (int j = 0; j < width; ++j)
		cout << '#';
	    cout << endl;
	}
	cout << endl;

}

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

import java.util.Scanner;
public class aoj10012 {
   public static void main(String[] args){
	   Scanner buf = new Scanner(System.in);
	   int h,w;
	   while(true){
		   h = buf.nextInt();
		   w = buf.nextInt();
		   if(h == 0 && w == 0) break;
		   for(int i=0;i<h;i++){
			   for(int j=0;j<w;j++) System.out.print('#');
			   System.out.println();
		   }
	   }
   }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: expected unqualified-id before 'public'
    2 | public class aoj10012 {
      | ^~~~~~
Language: C++

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

  while(1){
  cin>>H,;
  cin>>W;
if(H==W&&W==0)break;
for(i=0;i<H;i++){
  for(k=0;k<W;k++)cout<<'#'
cout<<endl;
}
cout<<endl;
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: expected primary-expression before ';' token
    7 |   cin>>H,;
      |          ^
a.cc:11:28: error: expected ';' before 'cout'
   11 |   for(k=0;k<W;k++)cout<<'#'
      |                            ^
      |                            ;
   12 | cout<<endl;
      | ~~~~
Language: C++

#include<iostream>

using namespace std;
            
int main(){

        int H  = 0;
	int W  = 0;

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

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

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

class Main
{
	public static void main(String[] args)
	{
		Scanner stdIn = new Scanner(System.in);
		int h, w;
		int i, j;
		
		h = stdIn.nextInt();
		w = stdIn.nextInt();
		
		while (h != 0 && w != 0){
			for (i = 0; i < h; i++){
				for (j = 0; j < w; j++){
					System.out.print("#");
				}
				System.out.println("");
			}
			System.out.println("");
			h = stdIn.nextInt();
			w = stdIn.nextInt();
		}
	}
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.io.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.util.*;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:15: error: expected ':' before 'static'
    6 |         public static void main(String[] args)
      |               ^~~~~~~
      |               :
a.cc:6:33: error: 'String' has not been declared
    6 |         public static void main(String[] args)
      |                                 ^~~~~~
a.cc:6:42: error: expected ',' or '...' before 'args'
    6 |         public static void main(String[] args)
      |                                          ^~~~
a.cc:27:2: error: expected ';' after class definition
   27 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:8:17: error: 'Scanner' was not declared in this scope
    8 |                 Scanner stdIn = new Scanner(System.in);
      |                 ^~~~~~~
a.cc:12:21: error: 'stdIn' was not declared in this scope; did you mean 'std'?
   12 |                 h = stdIn.nextInt();
      |                     ^~~~~
      |                     std
a.cc:18:41: error: 'System' was not declared in this scope
   18 |                                         System.out.print("#");
      |                                         ^~~~~~
a.cc:20:33: error: 'System' was not declared in this scope
   20 |                                 System.out.println("");
      |                                 ^~~~~~
a.cc:22:25: error: 'System' was not declared in this scope
   22 |                         System.out.println("");
      |                         ^~~~~~
Language: C++

#include <iostream>
using namespace std;

int main() {

int H,W;

while(1){

cin >> H >> W;

if(H == 0 ) break;

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

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

cout << "#";

}

cout << endl;
	
}
	return 0;
}

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

int main(int argc, const char * argv[])
{
    int h,w;
    int i,j;
    
    do{
        scanf("%d %d",&h, &w);
        for (i=0; i < h; i++) {
            for (j=0; j < w; j++) {
                printf("#");
            }
            printf("\n\n");
        }
        
    }while (h!=0 && w!=0);
    
    return 0;
}

Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:7:9: error: 'scanf' was not declared in this scope
    7 |         scanf("%d %d",&h, &w);
      |         ^~~~~
a.cc:10:17: error: 'printf' was not declared in this scope
   10 |                 printf("#");
      |                 ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(int argc, const char * argv[])
a.cc:12:13: error: 'printf' was not declared in this scope
   12 |             printf("\n\n");
      |             ^~~~~~
a.cc:12:13: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++


int main(void)
{
    int h,w;
    int i,j;
    
    do{
        scanf("%d %d",&h, &w);
        for (i=0; i < h; i++) {
            for (j=0; j < w; j++) {
                printf("#");
            }
            printf("\n");
        }
        printf("\n");
    }while (h!=0 && w!=0);
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'scanf' was not declared in this scope
    8 |         scanf("%d %d",&h, &w);
      |         ^~~~~
a.cc:11:17: error: 'printf' was not declared in this scope
   11 |                 printf("#");
      |                 ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | 
a.cc:13:13: error: 'printf' was not declared in this scope
   13 |             printf("\n");
      |             ^~~~~~
a.cc:13:13: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:15:9: error: 'printf' was not declared in this scope
   15 |         printf("\n");
      |         ^~~~~~
a.cc:15:9: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

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

#include <iostream>
using namespace std;

int main() {
	for(int h=0; h<3; h+=1 ){
		for(int w=0; w<4; w+=1){
			cout <<"#"<<endl;
	}
		cout <<"#"<<endl;
	return 0;
}

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

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

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

Compiler output:
Main.java:4: error: class Chessboard is public, should be declared in a file named Chessboard.java
public class Chessboard{
       ^
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 i,j;
			int H = sc.nextInt();
			int W= sc.nextInt();
			if (H == 0 && W == 0) {
				break;
			}else{
				for(i=1;i<=H;i++){
					for(j=1;j<=W;j++){
						if((i+j)%2==0){
							System.out.printf("#");
						}else{
							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;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int k = 0;
    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(k == 0){
            System.out.printf("#", b);
            k = 1;
          }else{
            System.out.printf(".", b);
            k = 0;
          }
        }
      }
    }
  }
}

Compiler output:
Main.java:10: error: cannot find symbol
        if (H == 0 && W == 0) {
            ^
  symbol:   variable H
  location: class Main
Main.java:10: error: cannot find symbol
        if (H == 0 && W == 0) {
                      ^
  symbol:   variable W
  location: class Main
Main.java:16: error: cannot find symbol
            System.out.printf("#", b);
                                   ^
  symbol:   variable b
  location: class Main
Main.java:19: error: cannot find symbol
            System.out.printf(".", b);
                                   ^
  symbol:   variable b
  location: class Main
4 errors
Language: Java

import java.util.Scanner;
public class Chess{
	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((j+i)%2==0){
							System.out.printf("#");
						}else{
							System.out.printf(".");
						}
					}
					System.out.println("");
					System.out.println("");
				}
			}
		}
	}
}

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

package ????????°???????????°A;

import java.util.Scanner;

public class Main {

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

		while (true) {
			h = sc.nextInt();
			w = sc.nextInt();
			if (h == 0 && w == 0)
				break;
			for (int j = 0; j < h; j++) {
				if (j % 2 == 1) {
					for (i = 0; i < w; i++)
						if (i % 2 == 1)
							System.out.print("#");
						else
							System.out.print(".");

				}

				if (j % 2 == 0) {
					for (i = 0; i < w; i++)
						if (i % 2 == 1)
							System.out.print(".");
						else
							System.out.print("#");

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

			}
			System.out.printf("\n");
		}
		sc.close();
	}
}

Compiler output:
Main.java:1: error: <identifier> expected
package ?????????????????????A;
       ^
Main.java:1: error: illegal character: '\u00b0'
package ?????????????????????A;
                ^
Main.java:1: error: illegal character: '\u00b0'
package ?????????????????????A;
                            ^
3 errors
Language: Java

import java.util.Scanner;

public class PrintChess{
    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 + j) % 2 == 0){
                        System.out.print('#');
                    }else{
                        System.out.print('.');
                    }
                }
                System.out.print("\n");
            }
        }
    }
}

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


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

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

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

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.util.Scanner;
public class Print{
	public static void main(String[] args){
		Scanner sc =new Scanner(System.in);
		while(true){
			int i,j;
			int H=sc.nextInt();
			int W=sc.nextInt();
			if(H==0&&W==0){
				break;
			}
			for(i=0;i<H;i++){
				if(i%2==0){
				for(j=0;j<W;j++){
					if(j%2==0){
					System.out.printf("#");
				             }
				     else{
				      
				    System.out.printf(".");
				         }
				     }
				     System.out.printf("\n");
				if(i%2==1){
				for(j=0;j<W;j++){
					if(j%2==0){
					System.out.printf(".");
				             }
				     else{
				      
				    System.out.printf("#");
				         }
				     }
				    System.out.printf("\n"); 
			      }
			  }
			}
			      System.out.printf("\n");

		}
	}
}

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

import java.util.Scanner;
public class Chess {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int H=1,W=1;
		int i,j;
		H=sc.nextInt();
		W=sc.nextInt();
		while( H!=0||W!=0){
			
			for(i=1;i<=H;i++){
				for(j=1;j<=W;j++){
					if(i%2==1){
						if(j%2==1)
							System.out.printf("#");
						else
							System.out.printf(".");
					}
					else{
						if(j%2==1)
							System.out.printf(".");
						else
							System.out.printf("#");
					}
				}
				System.out.printf("\n");
			}
			System.out.printf("\n");
			H=sc.nextInt();
			W=sc.nextInt();
		}
	}
}

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

import java.util.Scanner;
public class PrintaChessboard {
	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 = 1; i <= H; i++){
				for(int j = 1; j <= W; j++){
					if(i % 2 == 1){
						if(j % 2 == 1){
							System.out.printf("#");
						}else{
							System.out.printf(".");
						}
					}else{
						if(j % 2 == 1){
							System.out.printf(".");
						}else{
							System.out.printf("#");
						}
					}
				}				
				System.out.println("");
			}
			System.out.println("");
// ???????????????(for?????????for)???????????????H x W?????? # ?????¨????????????!
		}
	}
}

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

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

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.util.Scanner;
public classMain {
public static voidmain(String[] args) {
int n = 1;
int j = 1;
Scanner sc= newScanner(System.in);

while(true) {
intH = sc.nextInt();
intW= sc.nextInt();
if (H == 0 && W == 0) {
break;
}
while(n<=H){
     if(n%2 == 1){
         while(j<=W){
              if(j%2 == 1){
                      System.out.printf("#");
              }
              else{
                      System.out.printf(".");
              }
              
              j++;
         }
       
      else{
           while(j<=W){
              if(j%2 == 1){
                      System.out.printf(",");
              }
              else{
                      System.out.printf("#");
              }
              
              j++;
                     
        }   

        j =1;
}
         

Compiler output:
Main.java:2: error: class, interface, enum, or record expected
public classMain {
       ^
Main.java:3: error: class, interface, enum, or record expected
public static voidmain(String[] args) {
              ^
Main.java:5: error: unnamed classes are a preview feature and are disabled by default.
int j = 1;
^
  (use --enable-preview to enable unnamed classes)
Main.java:8: error: class, interface, enum, or record expected
while(true) {
^
Main.java:10: error: class, interface, enum, or record expected
intW= sc.nextInt();
^
Main.java:11: error: class, interface, enum, or record expected
if (H == 0 && W == 0) {
^
Main.java:13: error: class, interface, enum, or record expected
}
^
Main.java:19: error: class, interface, enum, or record expected
              }
              ^
Main.java:22: error: class, interface, enum, or record expected
              }
              ^
Main.java:25: error: class, interface, enum, or record expected
         }
         ^
Main.java:31: error: class, interface, enum, or record expected
              }
              ^
Main.java:34: error: class, interface, enum, or record expected
              }
              ^
Main.java:38: error: class, interface, enum, or record expected
        }   
        ^
Main.java:41: error: class, interface, enum, or record expected
}
^
14 errors
Language: Java

import java.util.Scanner;
public class Main {
public static voidmain(String[] args) {
int n = 1;
int j = 1;
Scanner sc= newScanner(System.in);

while(true) {
intH = sc.nextInt();
intW= sc.nextInt();
if (H == 0 && W == 0) {
break;
}
while(n<=H){
     if(n%2 == 1){
         while(j<=W){
              if(j%2 == 1){
                      System.out.printf("#");
              }
              else{
                      System.out.printf(".");
              }
              
              j++;
         }
       
      else{
           while(j<=W){
              if(j%2 == 1){
                      System.out.printf(",");
              }
              else{
                      System.out.printf("#");
              }
              
              j++;
                     
        }   

        j =1;
}
         

Compiler output:
Main.java:3: error: invalid method declaration; return type required
public static voidmain(String[] args) {
              ^
Main.java:27: error: reached end of file while parsing
      else{
      ^
Main.java:41: error: reached end of file while parsing
}
 ^
3 errors
Language: Java

import java.util.Scanner;
public class Main {
public static voidmain(String[] args) {
int n = 1;
int j = 1;
Scanner sc= newScanner(System.in);

while(true) {
intH = sc.nextInt();
intW= sc.nextInt();
if (H == 0 && W == 0) {
break;
}
while(n<=H){
     if(n%2 == 1){
         while(j<=W){
              if(j%2 == 1){
                      System.out.printf("#");
              }
              if(j%2 == 0){
                      System.out.printf(".");
              }
              
              j++;
         }
       
      else{
           while(j<=W){
              if(j%2 == 1){
                      System.out.printf(",");
              }
              else{
                      System.out.printf("#");
              }
              
              j++;
                     
        }   

        j =1;
}
         }

Compiler output:
Main.java:3: error: invalid method declaration; return type required
public static voidmain(String[] args) {
              ^
Main.java:27: error: 'else' without 'if'
      else{
      ^
Main.java:42: error: reached end of file while parsing
         }
          ^
3 errors
Language: Java

import java.util.Scanner;
public class Main {
public static voidmain(String[] args) {
int n = 1;
int j = 1;
Scanner sc= newScanner(System.in);

while(true) {
intH = sc.nextInt();
intW= sc.nextInt();
if (H == 0 && W == 0) {
break;
}
while(n<=H){
     if(n%2 == 1){
         while(j<=W){
              if(j%2 == 1){
                      System.out.printf("#");
              }
              if(j%2 == 0){
                      System.out.printf(".");
              }
              
              j++;
         }
}
       
      else{
           while(j<=W){
              if(j%2 == 1){
                      System.out.printf(",");
              }
              else{
                      System.out.printf("#");
              }
              
              j++;
                     
        }   
}

        j =1;
}
         }

Compiler output:
Main.java:3: error: invalid method declaration; return type required
public static voidmain(String[] args) {
              ^
Main.java:44: error: reached end of file while parsing
         }
          ^
2 errors
Language: Java

import java.util.Scanner;
public class Main {
public static voidmain(String[] args) {
int n = 1;
int j = 1;
Scanner sc= newScanner(System.in);

while(true) {
intH = sc.nextInt();
intW= sc.nextInt();
if (H == 0 && W == 0) {
break;
}
while(n<=H){
     if(n%2 == 1){
         while(j<=W){
              if(j%2 == 1){
                      System.out.printf("#");
              }
              if(j%2 == 0){
                      System.out.printf(".");
              }
              
              j++;
         }
}
       
      else{
           while(j<=W){
              if(j%2 == 1){
                      System.out.printf(",");
              }
              else{
                      System.out.printf("#");
              }
              
              j++;
                     
        }   
}

        j =1;
}
         }
}

Compiler output:
Main.java:3: error: invalid method declaration; return type required
public static voidmain(String[] args) {
              ^
Main.java:45: error: reached end of file while parsing
}
 ^
2 errors
Language: Java

import java.util.Scanner;
public class Main {
public static voidmain(String[] args) {
int n = 1;
int j = 1;
Scanner sc= newScanner(System.in);

while(true) {
intH = sc.nextInt();
intW= sc.nextInt();
if (H == 0 && W == 0) {
break;
}
while(n<=H){
     if(n%2 == 1){
         while(j<=W){
              if(j%2 == 1){
                      System.out.printf("#");
              }
              if(j%2 == 0){
                      System.out.printf(".");
              }
              
              j++;
         }
}
       
      else{
           while(j<=W){
              if(j%2 == 1){
                      System.out.printf(",");
              }
              else{
                      System.out.printf("#");
              }
              
              j++;
                     
        }   
}

        j =1;
}

}
}

Compiler output:
Main.java:3: error: invalid method declaration; return type required
public static voidmain(String[] args) {
              ^
Main.java:46: error: reached end of file while parsing
}
 ^
2 errors