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

#include <iostream>
using namespace std;

int main() {
	int H, W, x,y;
	char a[300];
	char b[300];
	cin >> H >> W;
	for (int i = 0; i < 150; i++) {
		a[i * 2] = "#";
		a[i * 2 + 1] = ".";
		b[i * 2] = ".";
		b[i * 2 + 1] = "#";
	}
	x = W / 2;
	for (int j = 0; j < x; j++) {
		for (int k = 0; k < W; k++) {
			cout << a[k];
		}
		cout << endl;
		for (int l = 0; l < W; l++) {
			cout << b[l];
		}
		cout << endl;
	}
	if (W % 2 == 1) {
		for (int m = 0; m < W; m++) {
			cout << a[m];
		}
	}
	return 0;
	}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:28: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   10 |                 a[i * 2] = "#";
      |                            ^~~
      |                            |
      |                            const char*
a.cc:11:32: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   11 |                 a[i * 2 + 1] = ".";
      |                                ^~~
      |                                |
      |                                const char*
a.cc:12:28: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   12 |                 b[i * 2] = ".";
      |                            ^~~
      |                            |
      |                            const char*
a.cc:13:32: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   13 |                 b[i * 2 + 1] = "#";
      |                                ^~~
      |                                |
      |                                const char*
Language: C++

#include <iostream>
using namespace std;

int main() {
	int H, W, x,y;
	const char a[300];
	const char b[300];
	cin >> H >> W;
	for (int i = 0; i < 150; i++) {
		a[i * 2] = "#";
		a[i * 2 + 1] = ".";
		b[i * 2] = ".";
		b[i * 2 + 1] = "#";
	}
	x = W / 2;
	for (int j = 0; j < x; j++) {
		for (int k = 0; k < W; k++) {
			cout << a[k];
		}
		cout << endl;
		for (int l = 0; l < W; l++) {
			cout << b[l];
		}
		cout << endl;
	}
	if (W % 2 == 1) {
		for (int m = 0; m < W; m++) {
			cout << a[m];
		}
	}
	return 0;
	}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:20: error: uninitialized 'const a' [-fpermissive]
    6 |         const char a[300];
      |                    ^
a.cc:7:20: error: uninitialized 'const b' [-fpermissive]
    7 |         const char b[300];
      |                    ^
a.cc:10:26: error: assignment of read-only location 'a[(i * 2)]'
   10 |                 a[i * 2] = "#";
      |                 ~~~~~~~~~^~~~~
a.cc:11:30: error: assignment of read-only location 'a[((i * 2) + 1)]'
   11 |                 a[i * 2 + 1] = ".";
      |                 ~~~~~~~~~~~~~^~~~~
a.cc:12:26: error: assignment of read-only location 'b[(i * 2)]'
   12 |                 b[i * 2] = ".";
      |                 ~~~~~~~~~^~~~~
a.cc:13:30: error: assignment of read-only location 'b[((i * 2) + 1)]'
   13 |                 b[i * 2 + 1] = "#";
      |                 ~~~~~~~~~~~~~^~~~~
Language: C++

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

int main() {
	int H, W, x;
	string a[300];
	string b[300];
	cin >> H >> W;
	while(!(H == 0 && W == 0)){
		for (int i = 0; i < 150; i++) {
			a[i * 2] = "#";
			a[i * 2 + 1] = ".";
			b[i * 2] = ".";
			b[i * 2 + 1] = "#";
		}
		a[300] = "#";
		b[300] = ".";
		x = H / 2;
		for (int j = 0; j < x; j++) {
			for (int k = 0; k < W; k++) {
				cout << a[k];
			}
			cout << "\n";
			for (int l = 0; l < W; l++) {
				cout << b[l];
			}
			cout << "\n";
		}
		if (W % 2 == 1) {
			for (int m = 0; m < W; m++) {
				cout << a[m];
			}
			cout << "\n";
			cin >> H >> W;
		}
	return 0;
	}

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

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

Compiler output:
a.cc:1:1: error: expected unqualified-id before 'while'
    1 | while True:
      | ^~~~~
Language: C++

while 1:
 h,w=map(int,input().split())
 if h==0:break
 for i in range(h):print(('#.'*w)[i%2:][:w])
 print()

Compiler output:
a.cc:4:27: warning: multi-character character constant [-Wmultichar]
    4 |  for i in range(h):print(('#.'*w)[i%2:][:w])
      |                           ^~~~
a.cc:1:1: error: expected unqualified-id before 'while'
    1 | while 1:
      | ^~~~~
Language: C++

#include <stdio.h>

int main(void)
{
	int h,w;
	int i,j;
	
	scanf("%d %d",&h,&w);
	
	if(h==0 && w==0)
	{
		goto break;
	}
	
	for(i=0;i<h;i++)
	{
		if(i%2 == 0)
		{
			for(j=0;j<w;j++)
			{
				if(j%2 == 0)
				{
					printf("#");
				}
				else
				{
					printf(".");
				}
			}
		}
		else
		{
			for(j=0;j<w;j++)
			{
				if(j%2 == 0)
				{
					printf(".");
				}
				else
				{
					printf("#");
				}
			}
		}
		printf("\n");
	}
	
	printf("\n");
	
	break:
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:22: error: expected identifier before 'break'
   12 |                 goto break;
      |                      ^~~~~
a.cc:12:21: error: expected ';' before 'break'
   12 |                 goto break;
      |                     ^~~~~~
      |                     ;
a.cc:12:22: error: break statement not within loop or switch
   12 |                 goto break;
      |                      ^~~~~
a.cc:50:9: error: break statement not within loop or switch
   50 |         break:
      |         ^~~~~
a.cc:50:14: error: expected ';' before ':' token
   50 |         break:
      |              ^
      |              ;
a.cc:50:14: error: expected primary-expression before ':' token
Language: C++

#include <iostream>
#include <string>
#include <algorithm>

using namespace std;

int main() {
 int h, w;
 string line;

 cin >> h >> w;

 while(h != 0 || w != 0) {
  for(int i = 0;i < w;i++) {
   if(i % 2 == 0)
    line += "#";
   else
    line += ".";
   }

   for(int i = 0;i < h;i++) {
    cout << line << endl;
    reverse(line.begin(), line.end());
   }
  }
 
  cin >> h >> w;
 }

 return 0;
}

Compiler output:
a.cc:30:2: error: expected unqualified-id before 'return'
   30 |  return 0;
      |  ^~~~~~
a.cc:31:1: error: expected declaration before '}' token
   31 | }
      | ^
Language: C++

include <iostream>
using namespace std;

int main() {
int a, b = 5;
while(1) {
cin >> a >> b;
if (a == 0 && b == 0) {
break;
}
for (int i = 0; i < a; i++) {
for (int j = 0; j < b; j++) {
if (i % 2 == 1) {
if (j % 2 == 1) {
cout << "#";
}else {
cout << ".";
} else {
if (j % 2 == 1) {
cout << ".";
}else {
cout << "#";
}
}
}cout << endl;
}} cout << endl; }
return 0;
}


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:1: error: 'cin' was not declared in this scope
    7 | cin >> a >> b;
      | ^~~
a.cc:15:1: error: 'cout' was not declared in this scope
   15 | cout << "#";
      | ^~~~
a.cc:17:1: error: 'cout' was not declared in this scope
   17 | cout << ".";
      | ^~~~
a.cc:18:3: error: expected '}' before 'else'
   18 | } else {
      |   ^~~~
a.cc:13:17: note: to match this '{'
   13 | if (i % 2 == 1) {
      |                 ^
a.cc:20:1: error: 'cout' was not declared in this scope
   20 | cout << ".";
      | ^~~~
a.cc:22:1: error: 'cout' was not declared in this scope
   22 | cout << "#";
      | ^~~~
a.cc:25:2: error: 'cout' was not declared in this scope
   25 | }cout << endl;
      |  ^~~~
a.cc:25:10: error: 'endl' was not declared in this scope
   25 | }cout << endl;
      |          ^~~~
a.cc:26:4: error: 'cout' was not declared in this scope
   26 | }} cout << endl; }
      |    ^~~~
a.cc:26:12: error: 'endl' was not declared in this scope
   26 | }} cout << endl; }
      |            ^~~~
a.cc: At global scope:
a.cc:27:1: error: expected unqualified-id before 'return'
   27 | return 0;
      | ^~~~~~
a.cc:28:1: error: expected declaration before '}' token
   28 | }
      | ^
Language: C++

#include <iostream>
using namespace std;

int main() {
int a, b = 5;
while(1) {
cin >> a >> b;
if (a == 0 && b == 0) {
break;
}
for (int i = 0; i < a; i++) {
for (int j = 0; j < b; j++) {
if (i % 2 == 1) {
if (j % 2 == 1) {
cout << "#";
}else {
cout << ".";
} else {
if (j % 2 == 1) {
cout << ".";
}else {
cout << "#";
}
}
}cout << endl;
}} cout << endl; }
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:3: error: expected '}' before 'else'
   18 | } else {
      |   ^~~~
a.cc:13:17: note: to match this '{'
   13 | if (i % 2 == 1) {
      |                 ^
a.cc: At global scope:
a.cc:27:1: error: expected unqualified-id before 'return'
   27 | return 0;
      | ^~~~~~
a.cc:28:1: error: expected declaration before '}' token
   28 | }
      | ^
Language: C++

#include <iostream>
using namespace std;

int main() {
int a, b = 5;
while(1) {
cin >> a >> b;
if (a == 0 && b == 0) {
break;
}
for (int i = 0; i < a; i++) {
for (int j = 0; j < b; j++) {
if (i % 2 == 1) {
if (j % 2 == 1) {
cout << "#";
}else {
cout << ".";
}} else {
if (j % 2 == 1) {
cout << ".";
}else {
cout << "#";
}
}
}cout << endl;
}} cout << endl; }
return 0;
}


Compiler output:
a.cc:27:1: error: expected unqualified-id before 'return'
   27 | return 0;
      | ^~~~~~
a.cc:28:1: error: expected declaration before '}' token
   28 | }
      | ^
Language: C++

#include<cstdio>
using namespace std;
int main(){
 int w,h;
 int cnt=0;
 while(1){
  cnt=0;
  scanf("%d %d",&h,&w);
  if(w==0 && h==0){
   printf("\n")
   return 0;
  }
  for(int i=0;i<h;i++){

   for(int j=0;j<w;j++){
    if(j==0 && cnt!=0){
        cnt++;
    }
    if(cnt%2==0){
     printf("#");
    }else{
     printf(".");
    }
    cnt++;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:16: error: expected ';' before 'return'
   10 |    printf("\n")
      |                ^
      |                ;
   11 |    return 0;
      |    ~~~~~~
Language: C++

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

int main(){

for(;;){
int x,y;
cin>>x>>y;
if(x==0 && y==0)break;
	for(int i=0;i<x;i++){
		for(int g=0;g<y;g++){
		if(i%2=1){cout<<"#.";
			if(g%2=1||g==y-1){cout<<"#"}
			}
		if(i%2=0){cout<<".#";
			if(g%2=1||g==y-1){cout<<"."}
		}
		cout<<endl;
		}
cout<<endl;
}
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:21: error: lvalue required as left operand of assignment
   12 |                 if(i%2=1){cout<<"#.";
      |                    ~^~
a.cc:13:29: error: lvalue required as left operand of assignment
   13 |                         if(g%2=1||g==y-1){cout<<"#"}
      |                            ~^~
a.cc:13:52: error: expected ';' before '}' token
   13 |                         if(g%2=1||g==y-1){cout<<"#"}
      |                                                    ^
      |                                                    ;
a.cc:15:21: error: lvalue required as left operand of assignment
   15 |                 if(i%2=0){cout<<".#";
      |                    ~^~
a.cc:16:29: error: lvalue required as left operand of assignment
   16 |                         if(g%2=1||g==y-1){cout<<"."}
      |                            ~^~
a.cc:16:52: error: expected ';' before '}' token
   16 |                         if(g%2=1||g==y-1){cout<<"."}
      |                                                    ^
      |                                                    ;
a.cc:23:2: error: expected '}' at end of input
   23 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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

int main(){

for(;;){
int x,y;
cin>>x>>y;
if(x==0 && y==0)break;
	for(int i=0;i<x;i++){
		for(int g=0;g<y;g++){
		if ((g+i)%2=0){cout<<"#";}
		else{cout<<".";}
		}
		cout<<endl;
		}
cout<<endl;
}
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:26: error: lvalue required as left operand of assignment
   12 |                 if ((g+i)%2=0){cout<<"#";}
      |                     ~~~~~^~
Language: C++

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

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

        cout <<endl;
     }
}


Compiler output:
a.cc:1:10: fatal error: bits/stdc++: No such file or directory
    1 | #include <bits/stdc++>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<bits/stdc++.h>

using namespace std;

int main(){

int H,W;

while(1){
int H,W;

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

for(int i=0;j<H;i++){
for(int j=0;j<W;j++){
if((i+j) %2 ==0) cout<<"#";

else cout<<".";

}
cout<<endl;
}
cout<<endl;
}
return 0;
}
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:13: error: 'j' was not declared in this scope
   15 | for(int i=0;j<H;i++){
      |             ^
a.cc: At global scope:
a.cc:28:1: error: expected unqualified-id before 'return'
   28 | return 0;
      | ^~~~~~
a.cc:29:1: error: expected declaration before '}' token
   29 | }
      | ^
Language: C++

#include<bits/stdc++.h>

using namespace std;

int main(){

while(1){
int H,W;

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

for(int i=0;j<H;i++){
for(int j=0;j<W;j++){
if((i+j) %2 ==0) 
cout<<"#";

else cout<<".";

}
cout<<endl;
}
cout<<endl;
}
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:13: error: 'j' was not declared in this scope
   13 | for(int i=0;j<H;i++){
      |             ^
Language: C++

#include<cstdio>
#include<iostream>
using namespace std;
int subf(int,int);
int H,W;

int main(){
  while(1){
    cin >> H >> W;
    if (H == 0 && W == 0){
      break;
    }else{
      subf(H,W);
    }
  }
  return 0;
}

subf(int h,int w){
  int j,k=0;
while(1){
 if (k>h){break;}else{

while(k<=h){
  while(j<=w){
     cout << ".";
     j++;
     if (j<=W){
       cout << "#";
       j++;
     }
   }
   puts("");
   k++;
   j=0;
   break;
  }

  while(k<=h){
   while(j<=w){
     cout << "#";
     j++;
     if (j<=W){
       cout << ".";
       j++;
     }
   }
   puts("");
   k++;
   j=0;
   break;
  }

}
}
return 0;
}



Compiler output:
a.cc:19:1: error: ISO C++ forbids declaration of 'subf' with no type [-fpermissive]
   19 | subf(int h,int w){
      | ^~~~
Language: C++

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

int main(){
  while(1){
    int H, W;
    cin>>H>>W;
    if(H == 0 && W == 0)break;

    for(int i=0;i<H;i++){
      for(int j=0;j<W;j++){
	if((i + j) %2 == 0) cout<<"#";
	eles cout<<".";
      }
      cout<<endl;
    }

    cout<<endl;
  }
  return 0;
}



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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:22: error: expected primary-expression before 'int'
    8 |                 fot (int i = 1; i <= H; i++) {
      |                      ^~~
a.cc:8:33: error: 'i' was not declared in this scope
    8 |                 fot (int i = 1; i <= H; i++) {
      |                                 ^
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:22: error: expected primary-expression before 'int'
    7 |                 fot (int i = 1; i <= H; i++) {
      |                      ^~~
a.cc:7:33: error: 'i' was not declared in this scope
    7 |                 fot (int i = 1; i <= H; i++) {
      |                                 ^
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:14:53: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   14 |                                         std::cout <<endl;
      |                                                     ^~~~
      |                                                     std::endl
In file included from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:16:45: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   16 |                                 std::cout <<endl;
      |                                             ^~~~
      |                                             std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:36: error: expected primary-expression before '<' token
    7 |                 for (int i = 1; i =< H; i++) {
      |                                    ^
a.cc:8:44: error: expected primary-expression before '<' token
    8 |                         for (int j = 1; j =< W; j++) {
      |                                            ^
a.cc:14:53: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   14 |                                         std::cout <<endl;
      |                                                     ^~~~
      |                                                     std::endl
In file included from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:16:45: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   16 |                                 std::cout <<endl;
      |                                             ^~~~
      |                                             std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:15:53: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   15 |                                         std::cout <<endl;
      |                                                     ^~~~
      |                                                     std::endl
In file included from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:17:45: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   17 |                                 std::cout <<endl;
      |                                             ^~~~
      |                                             std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:16:45: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   16 |                                 std::cout <<endl;
      |                                             ^~~~
      |                                             std::endl
In file included from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:18:30: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   18 |                  std::cout <<endl;
      |                              ^~~~
      |                              std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<iostream>
using namespace std;

int main(){
    int h,w;
    while(1){
        cin>>h>>w;
        if(h==0&&w==0)break;
        for(int i=0;i<h;i++){
            for(int j=0;j<w;j++){
                if((i+f)%2==0)cout<<"#";
                else cout<<".";
            }cout<<endl;
        }cout<<endl;
    }return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:23: error: 'f' was not declared in this scope
   11 |                 if((i+f)%2==0)cout<<"#";
      |                       ^
Language: C++

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		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((j+i)%2==0) {
						System.out.printf("#");
					}else {System.out.printf(".");
					}
				}System.out.printf("\n");
			}System.out.printf("\n");
		}sc.close();

	}

}


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

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

int main(){
   while(1){
     int H, W;
     cin>>H>>W;
     if(H == 0 && W == 0)  break;

     for(int i=0;i<H;i++){
        for(int j=0;j<W;j++){
          if((i + j) % 2 == 0) cout<<"#3 4

          else cout<<".";
          }
          cout<<endl;

        }
        cout<<endl;
 
    }

    return 0;
}


Compiler output:
a.cc:13:38: warning: missing terminating " character
   13 |           if((i + j) % 2 == 0) cout<<"#3 4
      |                                      ^
a.cc:13:38: error: missing terminating " character
   13 |           if((i + j) % 2 == 0) cout<<"#3 4
      |                                      ^~~~~
a.cc: In function 'int main()':
a.cc:15:11: error: expected primary-expression before 'else'
   15 |           else cout<<".";
      |           ^~~~
Language: C++

#include <cstring>
#define HW_MAX 300

void
set_line(char *s, int w, int p_start_with_sharp) {
  int i;
  for (i = 0; i < w; i++) {
    if (i % 2 == p_start_with_sharp) {
      s[i] = '.';
    } else {
      s[i] = '#';
    }
  }
  s[i] = '\0';
  return;
}

int
main(void)
{
  int h, w, i;
  char s0[HW_MAX + 1], s1[HW_MAX + 1];
  
  while (std::scanf("%d %d", &h, &w) != EOF) {
    if (h == 0 && w == 0) {
      break;
    }

    set_line(s0, w, 0);
    set_line(s1, w, 1);

    for (i = 0; i < h; i++) {
      if (i % 2 == 0) {
        std::printf("%s\n", s1);
      } else {
        std::printf("%s\n", s0);
      }
    }
    std::printf("\n");
  }
  
  return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:24:15: error: 'scanf' is not a member of 'std'
   24 |   while (std::scanf("%d %d", &h, &w) != EOF) {
      |               ^~~~~
a.cc:24:41: error: 'EOF' was not declared in this scope
   24 |   while (std::scanf("%d %d", &h, &w) != EOF) {
      |                                         ^~~
a.cc:2:1: note: 'EOF' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
    1 | #include <cstring>
  +++ |+#include <cstdio>
    2 | #define HW_MAX 300
a.cc:34:14: error: 'printf' is not a member of 'std'
   34 |         std::printf("%s\n", s1);
      |              ^~~~~~
a.cc:36:14: error: 'printf' is not a member of 'std'
   36 |         std::printf("%s\n", s0);
      |              ^~~~~~
a.cc:39:10: error: 'printf' is not a member of 'std'
   39 |     std::printf("\n");
      |          ^~~~~~
Language: C++

def numinput():
    a = input().split()
    for i in range(len(a)):
        a[i] = int(a[i])
    return a
   
def main():
    while True:
        a = numinput()
        if a[0] == 0 and a[1] == 0: break
        H = a[0];  W = a[1]
        for i in range(H):
            bar = ""
            for j in range(W):
                if i + j == 0: bar += "#"
                else: bar += "."
            if i < H - 1: print(bar)
            else: print(bar + '\n')
   
if __name__ == "__main__":
    main()


Compiler output:
a.cc:1:1: error: 'def' does not name a type
    1 | def numinput():
      | ^~~
a.cc:11:20: error: 'W' does not name a type
   11 |         H = a[0];  W = a[1]
      |                    ^
Language: C++

  1 #include <iostream>
  2 using namespace std;
  3 
  4 int main()
  5 {
  6     int H, W;
  7     while (true)
  8     {
  9         cin >> H >> W;
 10         if (H == 0 && W == 0)
 11             break;
 12         for (int h; h < H; h++)
 13         {
 14             for (int w; w < W; w++)
 15             {
 16                 
 17             }
 18         }
 19     }
 20 }


Compiler output:
a.cc:1:5: error: stray '#' in program
    1 |   1 #include <iostream>
      |     ^
a.cc:1:3: error: expected unqualified-id before numeric constant
    1 |   1 #include <iostream>
      |   ^
a.cc:3:3: error: expected unqualified-id before numeric constant
    3 |   3
      |   ^
Language: C++

using namespace std;


int main()
{
	int H[100], W[100], count,count1,odd;
	count = 0;
	count1 = 0;
	odd = 3;
	while (count < 300)
	{
		cin >> H[count] >> W[count];
		if (H[count] == 0 && W[count] == 0)
			break;
		count++;
		count1++;
	}
	for (count = 0; count < count1; count++)
	{
		for (int loopH = 0; loopH < H[count] ; loopH++)
		{
			odd++;
			for (int loopW = 0; loopW < W[count] ; loopW++)
			{
				if (odd % 2 == 1)
				{
					cout << "#";
				}
				else
				{
					cout << ".";
				}
				odd++;
			}
			cout<<endl;
		}
		odd = 3;
		cout<<endl;
	}

	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: 'cin' was not declared in this scope
   12 |                 cin >> H[count] >> W[count];
      |                 ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:27:41: error: 'cout' was not declared in this scope
   27 |                                         cout << "#";
      |                                         ^~~~
a.cc:27:41: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:31:41: error: 'cout' was not declared in this scope
   31 |                                         cout << ".";
      |                                         ^~~~
a.cc:31:41: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:35:25: error: 'cout' was not declared in this scope
   35 |                         cout<<endl;
      |                         ^~~~
a.cc:35:25: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:35:31: error: 'endl' was not declared in this scope
   35 |                         cout<<endl;
      |                               ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
a.cc:38:17: error: 'cout' was not declared in this scope
   38 |                 cout<<endl;
      |                 ^~~~
a.cc:38:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:38:23: error: 'endl' was not declared in this scope
   38 |                 cout<<endl;
      |                       ^~~~
a.cc:38:23: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

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

	int i, k, length, width;
	scanf("%d %d", &length, &width);
	for (i = 1; i <= length; i++) {
		if (i % 2 == 1) {
			for (k = 1; k <= width; k++) {
				if (l % 2 == 1) {
					printf("#");
				}
				else {
					printf(".");
				}
			}
		}
		else {
			for (k = 1; k <= width; k++) {
				if (l % 2 == 1) {
					printf(".");
				}
				else {
					printf("#");
				}
			}
		}
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:37: error: 'l' was not declared in this scope
    9 |                                 if (l % 2 == 1) {
      |                                     ^
a.cc:19:37: error: 'l' was not declared in this scope
   19 |                                 if (l % 2 == 1) {
      |                                     ^
Language: C++

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

	int i, k, length, width;
	while () {
		scanf("%d %d", &length, &width);
		if (length == 0 && width == 0) {
			break;
		}
		for (i = 1; i <= length; i++) {
			if (i % 2 == 1) {
				for (k = 1; k <= width; k++) {
					if (l % 2 == 1) {
						printf("#");
					}
					else {
						printf(".");
					}
				}
			}
			else {
				for (k = 1; k <= width; k++) {
					if (l % 2 == 1) {
						printf(".");
					}
					else {
						printf("#");
					}
				}
			}
		}
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:16: error: expected primary-expression before ')' token
    5 |         while () {
      |                ^
a.cc:13:45: error: 'l' was not declared in this scope
   13 |                                         if (l % 2 == 1) {
      |                                             ^
a.cc:23:45: error: 'l' was not declared in this scope
   23 |                                         if (l % 2 == 1) {
      |                                             ^
Language: C++

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

	int i, k, length, width;
	while () {
		scanf("%d %d", &length, &width);
		if (length == 0 && width == 0) {
			break;
		}
		for (i = 1; i <= length; i++) {
			if (i % 2 == 1) {
				for (k = 1; k <= width; k++) {
					if (k % 2 == 1) {
						printf("#");
					}
					else {
						printf(".");
					}
				}
			}
			else {
				for (k = 1; k <= width; k++) {
					if (k % 2 == 1) {
						printf(".");
					}
					else {
						printf("#");
					}
				}
			}
		}
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:16: error: expected primary-expression before ')' token
    5 |         while () {
      |                ^
Language: C++

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

	int i, k, length, width;
	while (1) {
		scanf_s("%d %d", &length, &width);
		if (length == 0 && width == 0) {
			break;
		}
		for (i = 1; i <= length; i++) {
			if (i % 2 == 1) {
				for (k = 1; k <= width; k++) {
					if (k % 2 == 1) {
						printf("#");
					}
					else {
						printf(".");
					}
				}
				printf("\n");
			}
			else {
				for (k = 1; k <= width; k++) {
					if (k % 2 == 1) {
						printf(".");
					}
					else {
						printf("#");
					}
				}
				printf("\n");
			}
		}
	}
	return 0;
}


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

#include<iostream>

using namespace std;

int main(){
    int h,w;
    cin>>h>>w;
    while(true){
        cin>>h>>w;
        
        if((h|w) != 0){
            for(int i =0;i<h;i++){
                for(int j =0;j<w;j++){
                    if((i+j)%2 ==0){
                        cout<<"#";
                        
                    }else{
                        cout<<".";
                        
                }
                cout<<endl;
                
            }
            cout<<endl;
            
        }else{
            break;
        }
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:10: error: expected '}' before 'else'
   26 |         }else{
      |          ^~~~
a.cc:11:23: note: to match this '{'
   11 |         if((h|w) != 0){
      |                       ^
Language: C++

#include<iostream>

using namespace std;

int main(){
    int h,w;
    while(true){
        cin>>h>>w;
        
        if((h|w) != 0){
            for(int i =0;i<h;i++){
                for(int j =0;j<w;j++){
                    if((i+j)%2 ==0){
                        cout<<"#";
                        
                    }else{
                        cout<<".";
                        
                }
                cout<<endl;
                
            }
            cout<<endl;
            
        }else{
            break;
        }
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:10: error: expected '}' before 'else'
   25 |         }else{
      |          ^~~~
a.cc:10:23: note: to match this '{'
   10 |         if((h|w) != 0){
      |                       ^
Language: C++

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

int main(){

  while(1){
  int H, W;
  cin>>H>>W;
  if(H==0&&W==0)break;
  for(int i=0;i<H;i++){
    for(int j=0;j<W;j++){
      if((i+j)%2==0)cout<<"#";
      if((i+j)%2!=0)cout<<".";

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


  return 0;
}



Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:8:3: error: 'cin' was not declared in this scope
    8 |   cin>>H>>W;
      |   ^~~
a.cc:12:21: error: 'cout' was not declared in this scope
   12 |       if((i+j)%2==0)cout<<"#";
      |                     ^~~~
a.cc:13:21: error: 'cout' was not declared in this scope
   13 |       if((i+j)%2!=0)cout<<".";
      |                     ^~~~
a.cc:15:6: error: 'cout' was not declared in this scope
   15 |     }cout<<endl;
      |      ^~~~
a.cc:15:12: error: 'endl' was not declared in this scope
   15 |     }cout<<endl;
      |            ^~~~
a.cc:16:4: error: 'cout' was not declared in this scope
   16 |   }cout<<endl;
      |    ^~~~
a.cc:16:10: error: 'endl' was not declared in this scope
   16 |   }cout<<endl;
      |          ^~~~
Language: C++

#include<iostream>
using namespace std;

int main(){
  int h, w;
  while(1){
    cin >> h >> w;
    if(h==0 && w==0){
      break;
    }
    for(int i=0; i<h; i++){
      for(int j=0; j<w; j++){
	if((i+j)%2==0){
	  cout << "#";
	}else{
	  cout << ".";
	}
      }
      cout << "\n";
    }
 cout << "\n";
  }
  return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:23:12: error: expected '}' at end of input
   23 |   return 0;
      |            ^
a.cc:4:11: note: to match this '{'
    4 | 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;
    }
    for(int i=0; i<h; i++){
      for(int j=0; j<w; j++){
	if((i+j)%2==0){
	  cout << "#";
	}else{
	  cout << ".";
	}
      }
      cout << "\n";
    }
    cout << "\n";
  }
  return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:23:12: error: expected '}' at end of input
   23 |   return 0;
      |            ^
a.cc:4:11: note: to match this '{'
    4 | 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;
		}
		 for (i=0; i<h/2; i++){
		 	for (j=0; j<w/2; j++ ){
		 		cout<<"#.";
		 	}
		 	if (w%2 == 1){
		 		cout<<"#";
		 	}
		 	cout<<endl;
		 	for (j=0; j<w/2; j++ ){
		 		cout<<".#";
		 	}
		 	if (w%2 == 1){
		 		cout<<".";
		 	}
		 	cout<<endl;
		 } 
		 if(h%2==1){
		 	for (j=0; j<w/2; j++ ){
		 		cout<<"#.";
		 	}
		 	if (w%2 == 1){
		 		cout<<"#";
		 	}
		 }
		 cout<<endl;
		 cout<<endl;
	}
    return 0;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:11:23: error: 'i' was not declared in this scope
   11 |                  for (i=0; i<h/2; i++){
      |                       ^
a.cc:12:30: error: 'j' was not declared in this scope
   12 |                         for (j=0; j<w/2; j++ ){
      |                              ^
a.cc:19:30: error: 'j' was not declared in this scope
   19 |                         for (j=0; j<w/2; j++ ){
      |                              ^
a.cc:28:30: error: 'j' was not declared in this scope
   28 |                         for (j=0; j<w/2; j++ ){
      |                              ^
Language: C++

 #include <iostream>
    using namespace std;
     
    int main() {
	int h,w,p,q;
	while(1){
		cin>> h >> w;
		p=h/2;
		q=w/2;
		if(h == 0 && w == 0){
			break;
		}
		 for (i=0; i<p; i++){
		 	for (j=0; j<q; j++ ){
		 		cout<<"#.";
		 	}
		 	if (w%2 == 1){
		 		cout<<"#";
		 	}
		 	cout<<endl;
		 	for (j=0; j<q; j++ ){
		 		cout<<".#";
		 	}
		 	if (w%2 == 1){
		 		cout<<".";
		 	}
		 	cout<<endl;
		 } 
		 if(h%2==1){
		 	for (j=0; j<q; j++ ){
		 		cout<<"#.";
		 	}
		 	if (w%2 == 1){
		 		cout<<"#";
		 	}
		 }
		 cout<<endl;
		 cout<<endl;
	}
    return 0;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:13:23: error: 'i' was not declared in this scope
   13 |                  for (i=0; i<p; i++){
      |                       ^
a.cc:14:30: error: 'j' was not declared in this scope
   14 |                         for (j=0; j<q; j++ ){
      |                              ^
a.cc:21:30: error: 'j' was not declared in this scope
   21 |                         for (j=0; j<q; j++ ){
      |                              ^
a.cc:30:30: error: 'j' was not declared in this scope
   30 |                         for (j=0; j<q; j++ ){
      |                              ^
Language: C++

#include <iostream>
#include <cstdio>
#include <math.h>
using namespace std;

int main(){
    int a, b;
    //char op;
    while( cin >> a >> b, a ){
        for( int i = 0; i < a; i++ ){
            for( int j = 0; j < b; j++ ){
                if( (i*j)% == 0 ){
                    cout << '#';
                }else{
                    cout << '.';
                }
            }
            cout << endl;
        }
        cout << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:28: error: expected primary-expression before '==' token
   12 |                 if( (i*j)% == 0 ){
      |                            ^~
Language: C++

using namespace std;

int main(){
	int H, W, h, w;

	while (1){
		cin >> H >> W;
		if (H == 0 && W == 0) break;
		for (int i = 0; i < H; i++){
			for (int j = 0; j < W; j++){
				if (i%2==j%2){
					cout << "#";
				}	else {
					cout << ".";
				}
			}
			cout << endl;
		}
		cout << endl;

	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: 'cin' was not declared in this scope
    7 |                 cin >> H >> W;
      |                 ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:12:41: error: 'cout' was not declared in this scope
   12 |                                         cout << "#";
      |                                         ^~~~
a.cc:12:41: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:14:41: error: 'cout' was not declared in this scope
   14 |                                         cout << ".";
      |                                         ^~~~
a.cc:14:41: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:17:25: error: 'cout' was not declared in this scope
   17 |                         cout << endl;
      |                         ^~~~
a.cc:17:25: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:17:33: error: 'endl' was not declared in this scope
   17 |                         cout << endl;
      |                                 ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
a.cc:19:17: error: 'cout' was not declared in this scope
   19 |                 cout << endl;
      |                 ^~~~
a.cc:19:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:19:25: error: 'endl' was not declared in this scope
   19 |                 cout << endl;
      |                         ^~~~
a.cc:19:25: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: Java

import java.util.Scanner;

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

        int i = 1;
        while(true) {
            //CHECK_NUM:
            int x = i;
            int  END_CHECK_NUM=0;
            if (x % 3 == 0) {
                System.out.print(" " + i);
                //goto END_CHECK_NUM;
                END_CHECK_NUM=1;
            }
            while(END_CHECK_NUM==0) {
                //INCLUDE3:
                if (x % 10 == 3) {
                    System.out.print(" " + i);
                    break;
                }
                x /= 10;
                if (x==0)break;
            }
            //END_CHECK_NUM:
            if (++i > n) break;
            //if (++i <= n) goto CHECK_NUM;
        }
        System.out.println();
    }
}



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

import java.util.Scanner;

public class Main {

public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        for(int i = 1; i <= n; i++){
        if(i % 3 == 0){
        	
        		System.out.print(i);
        		System.out.print(" ");
        	
        }
        
}
}



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

import java.util.Scanner;
public class sampledMain {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int i=1;
		
		while(i<=a){
			int b = i;
				if(b%3==0){
					System.out.print(" bは"+i);//" aは"
				}
			
				else {
					while(b>0){
						if (b % 10 == 3) {
						System.out.print(" x"+i+"x ");					    	
					        break;
					}
					    b /= 10;
				}
					}
				 i++;
				}
	


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


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

import java.util.Scanner;

public class StructuredProgramming {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		for (int i = 1; i <= n; i++) {
			if (i % 3 == 0 || i % 10 == 3 || i / 10 == 3) {
				int[] data = { i };
				for (int data1 : data) {
					System.out.print(" " + data1);
				}
			}
		}
		System.out.println("");
	}
}


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

import java.util.Scanner;

public class StructuredProgramming {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();

		for (int i = 1; i <= n; i++) {
			// 繰り返し(初期値; 終了条件; 増分)

				//i=i/10;

			if (i % 3 == 0 || i % 10 == 3 || i/10==3) {
				// 3で割り切れる数、もしくは一桁目が3であるとき

				int[] data = { i };
				// iがdataに格納
				for (int data1 : data) {
					System.out.print(" " + data1);
					// data1を出力
				}
				// i = i / 10;
			}
		}
	}
	// System.out.println("");
}


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

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();

		for (int i = 1; i <= n; i++) {
			// 繰り返し(初期値; 終了条件; 増分)

				//i=i/10;

			if (i % 3 == 0 || i % 10 == 3 || i/10==3) {
				// 3で割り切れる数、もしくは一桁目が3であるとき

				int[] data = { i };
				// iがdataに格納
				for (int data1 : data) {
					System.out.print(" " + data1);
					// data1を出力
				}
				// i = i / 10;
			}
		}
	}
	 System.out.println("");
}


Compiler output:
Main.java:27: error: <identifier> expected
	 System.out.println("");
	                   ^
Main.java:27: error: illegal start of type
	 System.out.println("");
	                    ^
2 errors
Language: Java

import java.util.Scanner;

public class StructuredProgramming {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();

		for (int i = 1; i <= n; i++) {
			// 繰り返し(初期値; 終了条件; 増分)

			// i=i/10;

			if (i % 3 == 0 || i % 10 == 3 || i / 10 == 3) {
				// 3で割り切れる数、もしくは一桁目が3であるとき

				int[] data = { i };
				// iがdataに格納
				for (int data1 : data) {
					System.out.print(" " + data1);
					// data1を出力
				}
				// i = i / 10;
			}
		}
		System.out.println("");
	}
}


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