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

#include<stdio.h>

int main(void)
{
	int a,b,c,tmp;
	
	scanf("%d%d%d",a,b,c);
	
	if(a<b){
		tmp=a;a=b;b=tmp;
	}
	if(b<c){
		tmp=b;b=c;c=tmp;
	}
	if(a<b){
		tmp=a;a=b;b=tmp;
	}
	printf("%d %d %d\n"a,b,c);
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:16: error: unable to find string literal operator 'operator""a' with 'const char [10]', 'long unsigned int' arguments
   18 |         printf("%d %d %d\n"a,b,c);
      |                ^~~~~~~~~~~~~
Language: C++

#include<stdio.h>

int main(void)
{
	int a,b,c,tmp;
	
	scanf("%d%d%d",&a,&b,&c);
	
	if(a<b){
		tmp=a;a=b;b=tmp;
	}
	if(b<c){
		tmp=b;b=c;c=tmp;
	}
	if(a<b){
		tmp=a;a=b;b=tmp;
	}
	printf("%d %d %d\n"a,b,c);
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:16: error: unable to find string literal operator 'operator""a' with 'const char [10]', 'long unsigned int' arguments
   18 |         printf("%d %d %d\n"a,b,c);
      |                ^~~~~~~~~~~~~
Language: C++

import java.util.Scanner;

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

		for(int i = 0; i < one.length; i++){
			int p = sc.nextInt();
			if(p <= one[0]){
				int x = one[0];
				int y = one[1];
				
				one[0] = p;
				one[1] = x;
				one[2] = y;
			}else{
				if(p <= one[1]){
					int x = one[1];
					one[1] = p;
					one[2] = x;
				}else{
					one[2] = p;
				}
			}
		}

		int t = one[2];
		one[2] = one[0];
		one[0] = t;		
		System.out.println(one[0] + " " + one[1] + " " + one[2]);
	}
}

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++

#include <iostream>
#include <algorithm>
#include <vector>

using namespace std;

int main() {
	vector<int> v;
	v.resize(3);

	for (int i = 0; i < 3; ++i)
		cin >> v[i];

	sort( v.begin(), v.end() );

	for (int i = 0; i < 3; ++i)
		cout << v[i] << (i == 3 ? endl : " ");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:50: error: overloaded function with no contextual type information
   17 |                 cout << v[i] << (i == 3 ? endl : " ");
      |                                                  ^~~
Language: C++

input = gets
n = input.split(/\s+/).map{|i| i.to_i}

n = n.sort

print n[0]," ",n[1]," ",n[2],"\n"

Compiler output:
a.cc:2:18: error: stray '\' in program
    2 | n = input.split(/\s+/).map{|i| i.to_i}
      |                  ^
a.cc:1:1: error: 'input' does not name a type; did you mean 'int'?
    1 | input = gets
      | ^~~~~
      | int
a.cc:4:1: error: 'n' does not name a type
    4 | n = n.sort
      | ^
Language: C++

#include<stdio.h>
 
 
int main(){
    int a[3];
    int i;
 
    for(i=3;i--;){
        scanf("%d",&a[i]);
    }
	sort(a,a+3);
    printf("%d %d %d\n",a[0],a[1],a[2]);
 
 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   11 |         sort(a,a+3);
      |         ^~~~
      |         short
Language: C++

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

void swap(int* a, int* b)
{
	if( *b < *a ){
		int tmp = *a;
		*a = *b;
		*b = tmp;
	}
}

void bsort(int a[])
{
	for( int i = 0; i < 3; ++i ){
		for( int t = i + 1; t < 3; ++t ){
			swap(a[i], a[t]);
		}
	}
}

int main(int argc, char const *argv[])
{
	int a, b, c;
    cin >> a >> b >> c;

    int t[] = {a, b, c};
    bsort(t);
	cout << t[0] << " " << t[1] << " " << t[2] << endl;
    getch();
	return 0;
}
	

Compiler output:
a.cc:2:10: fatal error: conio.h: No such file or directory
    2 | #include <conio.h>
      |          ^~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>

using namespace std;

#define puts(x) cout << #x << " : " << x << endl;

int main() {
  int a[3];
  cin >> a[0] >> a[1] >> a[2];
  sort(a, a + 3);
  cout << a[0] << ' ' << a[1] << ' ' << a[2] << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   10 |   sort(a, a + 3);
      |   ^~~~
      |   short
Language: C++

#include <stdio.h>
#include <algorithm>

int main() {
	int num[3];
	scanf("%d %d %d", num, num+1, num+2);
	std::sort(num, num+3)
	printf("%d %d %d\n", num[0], num[1], num[2]);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:30: error: expected ';' before 'printf'
    7 |         std::sort(num, num+3)
      |                              ^
      |                              ;
    8 |         printf("%d %d %d\n", num[0], num[1], num[2]);
      |         ~~~~~~
Language: C++

include<iostream>
using namespace std;
int main(){
	int a,b,c;
	int oku;
	cin >> a >> b >> c;
	if(a>b){
		oku=a;
		a=b;
	    b=oku;
	}
		
	
	if(a>c){
			oku=a;
			a=c;
			c=oku;
		if(b>c){
			oku=b;
			b=c;
			c=oku;
		}
	}
		cout << a <<" "<< b <<"<< c <<"<< endl;


}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope
    6 |         cin >> a >> b >> c;
      |         ^~~
a.cc:24:17: error: 'cout' was not declared in this scope
   24 |                 cout << a <<" "<< b <<"<< c <<"<< endl;
      |                 ^~~~
a.cc:24:51: error: 'endl' was not declared in this scope
   24 |                 cout << a <<" "<< b <<"<< c <<"<< endl;
      |                                                   ^~~~
Language: C++

#include<iostream>
using namespace std;

int main(void){
	int x[2] ={};
	int buf=0;

	cin >> x[0] >> x[1] >> x[2];
	if(x[0] > x[1]) change(&x + sizeof(int)*0, &x + sizeof(int)*1);
	if(x[1] > x[2]) change(&x + sizeof(int)*1, &x + sizeof(int)*2);
	if(x[0] > x[1]) change(&x + sizeof(int)*0, &x + sizeof(int)*1);
	cout <<x[0]<<" "<< x[1]<<" "<<x[2] <<endl;
	return 0;
}

void change(int* a, int* b){
	int buf = 0;
	buf = a;
	a = b;
	b = buf;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:25: error: 'change' was not declared in this scope
    9 |         if(x[0] > x[1]) change(&x + sizeof(int)*0, &x + sizeof(int)*1);
      |                         ^~~~~~
a.cc:10:25: error: 'change' was not declared in this scope
   10 |         if(x[1] > x[2]) change(&x + sizeof(int)*1, &x + sizeof(int)*2);
      |                         ^~~~~~
a.cc:11:25: error: 'change' was not declared in this scope
   11 |         if(x[0] > x[1]) change(&x + sizeof(int)*0, &x + sizeof(int)*1);
      |                         ^~~~~~
a.cc: In function 'void change(int*, int*)':
a.cc:18:15: error: invalid conversion from 'int*' to 'int' [-fpermissive]
   18 |         buf = a;
      |               ^
      |               |
      |               int*
a.cc:20:13: error: invalid conversion from 'int' to 'int*' [-fpermissive]
   20 |         b = buf;
      |             ^~~
      |             |
      |             int
Language: C++

#include<iostream>
using namespace std;

void change(int *a, int *b);

int main(void){
	int x[2] ={};
	int buf=0;

	cin >> x[0] >> x[1] >> x[2];
	if(x[0] > x[1]) change(&x + sizeof(int)*0, &x + sizeof(int)*1);
	if(x[1] > x[2]) change(&x + sizeof(int)*1, &x + sizeof(int)*2);
	if(x[0] > x[1]) change(&x + sizeof(int)*0, &x + sizeof(int)*1);
	cout <<x[0]<<" "<< x[1]<<" "<<x[2] <<endl;
	return 0;
}

void change(int* a, int* b){
	int buf = 0;
	buf = a;
	a = b;
	b = buf;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:35: error: cannot convert 'int (*)[2]' to 'int*'
   11 |         if(x[0] > x[1]) change(&x + sizeof(int)*0, &x + sizeof(int)*1);
      |                                ~~~^~~~~~~~~~~~~~~
      |                                   |
      |                                   int (*)[2]
a.cc:4:18: note:   initializing argument 1 of 'void change(int*, int*)'
    4 | void change(int *a, int *b);
      |             ~~~~~^
a.cc:12:35: error: cannot convert 'int (*)[2]' to 'int*'
   12 |         if(x[1] > x[2]) change(&x + sizeof(int)*1, &x + sizeof(int)*2);
      |                                ~~~^~~~~~~~~~~~~~~
      |                                   |
      |                                   int (*)[2]
a.cc:4:18: note:   initializing argument 1 of 'void change(int*, int*)'
    4 | void change(int *a, int *b);
      |             ~~~~~^
a.cc:13:35: error: cannot convert 'int (*)[2]' to 'int*'
   13 |         if(x[0] > x[1]) change(&x + sizeof(int)*0, &x + sizeof(int)*1);
      |                                ~~~^~~~~~~~~~~~~~~
      |                                   |
      |                                   int (*)[2]
a.cc:4:18: note:   initializing argument 1 of 'void change(int*, int*)'
    4 | void change(int *a, int *b);
      |             ~~~~~^
a.cc: In function 'void change(int*, int*)':
a.cc:20:15: error: invalid conversion from 'int*' to 'int' [-fpermissive]
   20 |         buf = a;
      |               ^
      |               |
      |               int*
a.cc:22:13: error: invalid conversion from 'int' to 'int*' [-fpermissive]
   22 |         b = buf;
      |             ^~~
      |             |
      |             int
Language: C++

#include<iostream>
using namespace std;

void change(int *a, int *b);

int main(void){
	int x[2] ={};
	int buf=0;

	cin >> x[0] >> x[1] >> x[2];
	if(x[0] > x[1]) change(x + sizeof(int)*0, x + sizeof(int)*1);
	if(x[1] > x[2]) change(x + sizeof(int)*1, x + sizeof(int)*2);
	if(x[0] > x[1]) change(x + sizeof(int)*0, x + sizeof(int)*1);
	cout <<x[0]<<" "<< x[1]<<" "<<x[2] <<endl;
	return 0;
}

void change(int* a, int* b){
	int buf = 0;
	buf = a;
	a = b;
	b = buf;
}

Compiler output:
a.cc: In function 'void change(int*, int*)':
a.cc:20:15: error: invalid conversion from 'int*' to 'int' [-fpermissive]
   20 |         buf = a;
      |               ^
      |               |
      |               int*
a.cc:22:13: error: invalid conversion from 'int' to 'int*' [-fpermissive]
   22 |         b = buf;
      |             ^~~
      |             |
      |             int
Language: C++

#include<iostream>
using namespace std;

void change(int* a, int* b);

int main(void){
	int x[2] ={};
	int buf=0;

	cin >> x[0] >> x[1] >> x[2];
	if(x[0] > x[1]) change(x + sizeof(int)*0, x + sizeof(int)*1);
	if(x[1] > x[2]) change(x + sizeof(int)*1, x + sizeof(int)*2);
	if(x[0] > x[1]) change(x + sizeof(int)*0, x + sizeof(int)*1);
	cout <<x[0]<<" "<< x[1]<<" "<<x[2] <<endl;
	return 0;
}

void change(int* a, int* b){
	int buf = 0;
	buf = a;
	a = b;
	b = buf;
}

Compiler output:
a.cc: In function 'void change(int*, int*)':
a.cc:20:15: error: invalid conversion from 'int*' to 'int' [-fpermissive]
   20 |         buf = a;
      |               ^
      |               |
      |               int*
a.cc:22:13: error: invalid conversion from 'int' to 'int*' [-fpermissive]
   22 |         b = buf;
      |             ^~~
      |             |
      |             int
Language: C++

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <stdio.h>
 
int main(void){
     int a[3], i, j, min_i, tmp;
     for(i = 0;i < 3;i++)
          scanf("%d",&a[i]);
     for(i = 0;i < 2;i++){
          min_i = i;
          for(j = i + 1;j < 3;j++)
               if(a[min_i] > a[j]) min_i = j;
          if(min_i != i){
               tmp = a[min_i];
               a[min_i] = a[i];
               a[i] = tmp;
          }
     }
     for(i = 0;i < 3;i++){
          printf("%d",a[i]);
          if(i < 2) printf(" ");
     }
     printf("\n");
}

Compiler output:
a.cc:1:1: error: expected unqualified-id before numeric constant
    1 | 1
      | ^
a.cc: In function 'int main()':
a.cc:26:11: error: 'scanf' was not declared in this scope
   26 |           scanf("%d",&a[i]);
      |           ^~~~~
a.cc:38:11: error: 'printf' was not declared in this scope
   38 |           printf("%d",a[i]);
      |           ^~~~~~
a.cc:22:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
   21 | #include <stdio.h>
  +++ |+#include <cstdio>
   22 | 
a.cc:41:6: error: 'printf' was not declared in this scope
   41 |      printf("\n");
      |      ^~~~~~
a.cc:41:6: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#include <stdio.h>
int main(void){
int a[3],b,c,box;
scanf("%d %d %d",&a[0],&a[1],&a[2]);
for(c = 0;c < 2;c++){
for(b =c+1 ;b < 3;b++){
if(a[c] > a[b]){
box = a[c];
a[c] = a[b];
a[b] = box;
}
}
}
printf("%d %d %d\n",&a[0],&a[1],%a[2]);
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:33: error: expected primary-expression before '%' token
   14 | printf("%d %d %d\n",&a[0],&a[1],%a[2]);
      |                                 ^
Language: C++

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

int main()
{
	vector<int> v = vector<int>(3);
	cin >> v[0] >> v[1] >> v[2];
	sort(v.begin(), v.end());
	cout << v[0] << " " << v[1] << " " << v[2] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'sort' was not declared in this scope; did you mean 'short'?
    9 |         sort(v.begin(), v.end());
      |         ^~~~
      |         short
Language: C++

#include<iostream>
using namespace std;

int main() {
	int x,y,z;
	cin>>x>>y>>z
	if(x<y){
		if(y<z){
			cout<<x<<" "<<y<<" "<<z<<endl;
		}else if(z<x){
			cout<<z<<" "<<x<<" "<<y<<endl;
		}else{
			cout<<x<<" "<<z<<" "<<y<<endl;
	}else{
		if(z<y){
			cout<<z<<" "<<y<<" "<<x<<endl;
		}else if(x<z){
			cout<<y<<" "<<x<<" "<<z<<endl;
		}else{
			cout<<y<<" "<<z<<" "<<x<<endl;
		}
	}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:21: error: expected ';' before 'if'
    6 |         cin>>x>>y>>z
      |                     ^
      |                     ;
    7 |         if(x<y){
      |         ~~           
a.cc:24:2: error: expected '}' at end of input
   24 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include<iostream>
using namespace std;

int main() {
	int x,y,z;
	cin>>x>>y>>z
	if(x<y){
		if(y<z){
			cout<<x<<" "<<y<<" "<<z<<endl;
		}else if(z<x){
			cout<<z<<" "<<x<<" "<<y<<endl;
		}else{
			cout<<x<<" "<<z<<" "<<y<<endl;
	}else{
		if(z<y){
			cout<<z<<" "<<y<<" "<<x<<endl;
		}else if(x<z){
			cout<<y<<" "<<x<<" "<<z<<endl;
		}else{
			cout<<y<<" "<<z<<" "<<x<<endl;
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:21: error: expected ';' before 'if'
    6 |         cin>>x>>y>>z
      |                     ^
      |                     ;
    7 |         if(x<y){
      |         ~~           
a.cc:24:2: error: expected '}' at end of input
   24 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include<iostream>
using namespace std;

int main() {
	int x,y,z;
	cin>>x>>y>>z;
	if(x<y){
		if(y<z){
			cout<<x<<" "<<y<<" "<<z<<endl;
		}else if(z<x){
			cout<<z<<" "<<x<<" "<<y<<endl;
		}else{
			cout<<x<<" "<<z<<" "<<y<<endl;
	}else{
		if(z<y){
			cout<<z<<" "<<y<<" "<<x<<endl;
		}else if(x<z){
			cout<<y<<" "<<x<<" "<<z<<endl;
		}else{
			cout<<y<<" "<<z<<" "<<x<<endl;
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:10: error: expected '}' before 'else'
   14 |         }else{
      |          ^~~~
a.cc:7:16: note: to match this '{'
    7 |         if(x<y){
      |                ^
Language: C++


#include<iostream>
using namespace std;
 
int main(){
    int a,b,c,d;
    cin>>a>>b>>c;
 
    if(a>b){
d=a;
a=b;
b=d;
}else{break;}
    if(b>c){
d=b;
b=c;
c=d;
} else{break;}
    if(a>b){
d=a;
a=b;
b=d;
} else{break;}

cout<<a<<" "<<b<<" "<<" "<<c<<endl;

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:7: error: break statement not within loop or switch
   13 | }else{break;}
      |       ^~~~~
a.cc:18:8: error: break statement not within loop or switch
   18 | } else{break;}
      |        ^~~~~
a.cc:23:8: error: break statement not within loop or switch
   23 | } else{break;}
      |        ^~~~~
Language: C++

#include <iostream>
//using namespace std;


int main()
{
	/*
	* 1. "<<"はストリームに流し込むオペレータと認識すれば良い
	* cout << a = cout(a)
	*/
	// 2. 入力値の範囲を確認するようにする
	int a[3], b[3], i, j, tmp;
	for (i = 0; i < 3; i++) {
		std::cin >> a[i];
	}
	for (i = 0; i < 3; i++) {
		for (j = i+1; j < 3; j++) {
			if (a[i] > a[j]) {
				tmp = a[i];
				a[i] = a[j];
				a[j] = tmp;
			}
		}
	}
	for (i = 0; i < 3; i++) {
		//std::cout << a[i] << " " << std::flush;
	}
	std::cout << a[0] << " " << a[1] << " " << a[2] << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:60: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   28 |         std::cout << a[0] << " " << a[1] << " " << a[2] << 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)
      |     ^~~~
Language: C++

#include <iostream>

using namespace std;
int main()
{
    int a[3];
    cin >> a[0] >> a[1] >> a[2];
    int i,j,tmp;
    
    for (i = 0; i < 3; i++) 
    {
        for (j = i+1; j < 3; j++) 
        {
            if (a[i] > a[j]) 
            {
                tmp = a[i];
                a[i] = a[j];
                a[j] = tmp; 
            }
        }
    }

    cout << a[0] << " " << a[1] << " " << a[2] endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:47: error: expected ';' before 'endl'
   23 |     cout << a[0] << " " << a[1] << " " << a[2] endl;
      |                                               ^~~~~
      |                                               ;
Language: C++

#include <iostream>
#include <algoirythm>

int main(int argc, char** argv)
{
    int input[3];
    std::cin >> input[0] >> input[1] >> input[2];

    std::sort(input, input + 3);

    std::cout << input[0] << " " << input[1] << " " << input[2] << std::endl;

    return 0;
}

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

#include <iostream>
#include <algorythm>

int main(int argc, char** argv)
{
    int input[3];
    std::cin >> input[0] >> input[1] >> input[2];

    std::sort(input, input + 3);

    std::cout << input[0] << " " << input[1] << " " << input[2] << std::endl;

    return 0;
}

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

#include <iostream>

int main(int argc, char** argv)
{
    const SIZE = 3
    int input[SIZE];
    for (int i = 0; i < SIZE; i++) {
        std::cin >> input[i];
    }

    for (int i = 0; i < SIZE; i++) {
        for (int j = 1; j < SIZE; j++) {
            if (input[j] < input[i]) {
                int temp = input[j];
                input[j] = input[i];
                input[i] = temp;
            }
        }
    }

    for (int i = 0; i < SIZE; i++) {
        std::cout << input[i];
        if (i == SIZE - 1) {
            std::cout << std::endl;
        } else {
            std::cout << ' ';
        }
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:5:11: error: 'SIZE' does not name a type
    5 |     const SIZE = 3
      |           ^~~~
a.cc:7:25: error: 'SIZE' was not declared in this scope
    7 |     for (int i = 0; i < SIZE; i++) {
      |                         ^~~~
a.cc:8:21: error: 'input' was not declared in this scope; did you mean 'int'?
    8 |         std::cin >> input[i];
      |                     ^~~~~
      |                     int
a.cc:11:25: error: 'SIZE' was not declared in this scope
   11 |     for (int i = 0; i < SIZE; i++) {
      |                         ^~~~
a.cc:13:17: error: 'input' was not declared in this scope; did you mean 'int'?
   13 |             if (input[j] < input[i]) {
      |                 ^~~~~
      |                 int
a.cc:21:25: error: 'SIZE' was not declared in this scope
   21 |     for (int i = 0; i < SIZE; i++) {
      |                         ^~~~
a.cc:22:22: error: 'input' was not declared in this scope; did you mean 'int'?
   22 |         std::cout << input[i];
      |                      ^~~~~
      |                      int
Language: C++

#include <iostream>

int main(int argc, char** argv)
{
    const int SIZE = 3
    int input[SIZE];
    for (int i = 0; i < SIZE; i++) {
        std::cin >> input[i];
    }

    for (int i = 0; i < SIZE; i++) {
        for (int j = 1; j < SIZE; j++) {
            if (input[j] < input[i]) {
                int temp = input[j];
                input[j] = input[i];
                input[i] = temp;
            }
        }
    }

    for (int i = 0; i < SIZE; i++) {
        std::cout << input[i];
        if (i == SIZE - 1) {
            std::cout << std::endl;
        } else {
            std::cout << ' ';
        }
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:6:5: error: expected ',' or ';' before 'int'
    6 |     int input[SIZE];
      |     ^~~
a.cc:8:21: error: 'input' was not declared in this scope; did you mean 'int'?
    8 |         std::cin >> input[i];
      |                     ^~~~~
      |                     int
a.cc:13:17: error: 'input' was not declared in this scope; did you mean 'int'?
   13 |             if (input[j] < input[i]) {
      |                 ^~~~~
      |                 int
a.cc:22:22: error: 'input' was not declared in this scope; did you mean 'int'?
   22 |         std::cout << input[i];
      |                      ^~~~~
      |                      int
Language: C++

#include<stdio.h>
#include<string.h>
int match_str(const char *a, const char *b);

void main()
{
FILE *fp;
int chk;
char a[100],fname[256],sstr[100];
printf("検索されるファイル名 : ");
scanf("%s",fname);
printf("検索文字列 : ");
scanf("%s",sstr);

if( (fp=fopen(fname,"r"))==NULL){
printf("ファイル %s が見つかりません\n",fname);return;
}
while(fgets(a,100,fp)!=NULL){
chk = match_str(a, sstr);
if (chk==1){
printf("%s",a);
}
}
}

int match_str(const char *a, const char *b)
{
    int i=0, j=0, max_a, max_b;
    while(1){
        if(a[i]=='\0'){max_a = i; break;}
        i++;
    }
    i=0;
    while(1){
        if(b[i]=='\0'){max_b = i; break;}
        i++;
    }
    for(i=0;i<max_a;i++){
        if(0==strncmp(&a[i],&b[j],1)){
            if(j==max_b-1){return 1;}
            else{j++;}
        }
    }
    return 0;
}

Compiler output:
a.cc:5:1: error: '::main' must return 'int'
    5 | void main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:16:48: error: return-statement with no value, in function returning 'int' [-fpermissive]
   16 | printf("ファイル %s が見つかりません\n",fname);return;
      |                                                ^~~~~~
Language: C++

#include<iostream>
#include<complex>
#include<algorithm>
#include<queue>
#include<cstdio>
#define rep(i, n) for (int i = 0; i < int(n); ++i)

using namespace std;

int main(void){

	int a,b,c,temp;
	cin >> a >> b >> c;

	while(!(a < b && b < c && a < c))
	{
		if(a > b){
			temp = a;
			a = b;
			b = temp;
		}else if(a > c)
		{
			temp = a;
			a = c;
			c = temp;
		}else if(b > c)
		{
			temp = b;
			b = c;
			c = temp;
		}
			
	}
	cout << a << " " << b << " " << c << endl;

	return 0;

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

#include<iostream>
using namespace std;

int main()
{
int a,b,c,w;
w=0;
cin>>a>>b>>c;

if(a>b){
w=b;
b=a;
a=w;
}
if(b>c){
w=c;
c=b;
b=w;
}
if(a>b){
w=b;
b=a;
a=W;
}

cout<<a<<b<<c<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:3: error: 'W' was not declared in this scope
   23 | a=W;
      |   ^
Language: C++

#include <iostream>
using namespace std;

int main(){
    int data[3];
    for(int j=0;j<3;j++){
        cin >> data[j];
    }
    sort(data,data + 3);
    for(int j=0;j<3;j++){
        cout << data[j] << " ";
    }
    cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'sort' was not declared in this scope; did you mean 'short'?
    9 |     sort(data,data + 3);
      |     ^~~~
      |     short
Language: C++

#include<iostrema>
using namespace std;
int main()
{
    int x , y, z, tmp;
    cin >> x >> y >> z;
    if (x > y){
    x = tmp;
    x = y;
    y = tmp;
    cout << x y z << endl;
    }
    if (y > z){
    y = tmp;
    y = z;
    z = tmp;
    }
    cout << x y z << endl;
    if (x > y){
    x = tmp;
    x = y;
    y = tmp;
    cout << x y z << endl; 
    }
    return 0;
}

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

#include<iostrema>
using namespace std;
int main()
{
    int x , y, z, tmp;
    cin >> x >> y >> z;
    if (x > y){
    x = tmp;
    x = y;
    y = tmp;
    }
    if (y > z){
    y = tmp;
    y = z;
    z = tmp;
    }
    if (x > y){
    x = tmp;
    x = y;
    y = tmp; 
    }
    cout << x y z << endl;
    return 0;
}

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

#include<iostrema>
using namespace std;
int main()
{
    int x , y, z, tmp;
    cin >> x >> y >> z;
    if (x > y){
    x = tmp;
    x = y;
    y = tmp;
    }
    if (y > z){
    y = tmp;
    y = z;
    z = tmp;
    }
    if (x > y){
    x = tmp;
    x = y;
    y = tmp; 
    }
    cout << x << y << z << endl;
    return 0;
}

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

#include<iostream>
using namespace std;
int main(){
int a,b,c,w;
cin>>a;
cin>>b;
if(a<b){w=a;a=b;b=w}
cin>>c;
if(b<c){w=b;b=c;c=w;
if(a<b){w=b;c=b;a=b;}}

cout<<c<<' '<<b<<' '<<a<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:20: error: expected ';' before '}' token
    7 | if(a<b){w=a;a=b;b=w}
      |                    ^
      |                    ;
Language: C++

#include <iostream>
using namespace std;
int main() {
    int a,b,c;
    int aa,bb,cc;
    cin >> a >> b >>c ;
    if (b>a) {
        aa=b;
        bb=a;
    }
    if (a>b) {
        aa=a;
        bb=b;
    }
    //cも比較に入れる
    if (bb<c) {
        if (aa<c) {
            cc=bb;
            bb=aa;
            aa=c;
        }
        else if (aa>c) {
            cc=bb;
            bb=c;
        }
    }
    if (bb>c) {
        cc=c;
    }
    cout<<aa<<" "<<bb<<" "<<cc<<endl;
    return 0;

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


#include <iostream>
using namespace std;
int main() {
    int a,b,c;
    int aa,bb,cc;
    cin >> a >> b >>c ;
    if (b>=a) {
        aa=b;
        bb=a;
    }
    if (a>b) {
        aa=a;
        bb=b;
    }
    //cも比較に入れる
    if (bb<c) {
        if (aa=<c) {
            cc=bb;
            bb=aa;
            aa=c;
        }
        else if (aa>c) {
            cc=bb;
            bb=c;
        }
    }
    if (bb>=c) {
        cc=c;
    }
    cout<<aa<<" "<<bb<<" "<<cc<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:16: error: expected primary-expression before '<' token
   18 |         if (aa=<c) {
      |                ^
Language: C++

#include<stdio.h>

void swap(int* a, int* b)
{
	*a = *a ^ *b;
	*b = *a ^ *b;
	*a = *a ^ *b;
}

int main(void)
{
	int x, y, z;	
void swap(int* a, int* b)
{
	*a = *a ^ *b;
	*b = *a ^ *b;
	*a = *a ^ *b;
}
	scanf("%d %d %d", &x, &y, &z);
	if(x > y) swap(&x, &y);
	if(y > z) swap(&y, &z);
	if(x > y) swap(&x, &y);
	printf("%d %d %d\n", x, y, z);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:1: error: a function-definition is not allowed here before '{' token
   14 | {
      | ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
    int a[3],c,d,i,j,s=10000;
    for(i=0;i<3;i++)
    {
        cin >> a[i];
    }
    for(d=0;d<3;d++)
    {
    for(j=0;j<3;j++)
    {
        if(a[j]<s)
        {
            s=a[j];
            c=j;
        }
    }
    cout<<s<<" ";
    a[c]=10000;
    s=100000;
    }
    cout<<endl;
    return 0;
}

        }
    }
    cout<<s<<" ";
    a[c]=10000;
    s=100000;
    }
    return 0;
}

Compiler output:
a.cc:28:9: error: expected declaration before '}' token
   28 |         }
      |         ^
a.cc:29:5: error: expected declaration before '}' token
   29 |     }
      |     ^
a.cc:30:5: error: 'cout' does not name a type
   30 |     cout<<s<<" ";
      |     ^~~~
a.cc:31:5: error: 'a' does not name a type
   31 |     a[c]=10000;
      |     ^
a.cc:32:5: error: 's' does not name a type
   32 |     s=100000;
      |     ^
a.cc:33:5: error: expected declaration before '}' token
   33 |     }
      |     ^
a.cc:34:5: error: expected unqualified-id before 'return'
   34 |     return 0;
      |     ^~~~~~
a.cc:35:1: error: expected declaration before '}' token
   35 | }
      | ^
Language: C++

#include<iostream>
using namespace std;
#include<algorithm>
#include<vector>

int main(){
	vector<int> array;
	cin >> array[0] >> array[1] >> array[2];

	sort(array.begin, array.end);

	cout << array[0] << array[1] << array[2] << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: no matching function for call to 'sort(<unresolved overloaded function type>, <unresolved overloaded function type>)'
   10 |         sort(array.begin, array.end);
      |         ~~~~^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:3:
/usr/include/c++/14/bits/stl_algo.h:4762:5: note: candidate: 'template<class _RAIter> void std::sort(_RAIter, _RAIter)'
 4762 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:4762:5: note:   template argument deduction/substitution failed:
a.cc:10:13: note:   couldn't deduce template parameter '_RAIter'
   10 |         sort(array.begin, array.end);
      |         ~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4793:5: note: candidate: 'template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare)'
 4793 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:4793:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator, class _Compare> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _Compare)'
  292 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp);
      | ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note:   candidate expects 4 arguments, 2 provided
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator)'
  296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
      | ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note:   candidate expects 3 arguments, 2 provided
Language: C++

#include<iostream>
using namespace std;

int main()
{
	array<int, 3> nums;
	cin >> nums[0] >> nums[1] >> nums[2];
	sort(nums);
	cout << nums[0] << ' ' << nums[1] << ' ' << nums[2] << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:23: error: aggregate 'std::array<int, 3> nums' has incomplete type and cannot be defined
    6 |         array<int, 3> nums;
      |                       ^~~~
a.cc:2:1: note: 'std::array' is defined in header '<array>'; this is probably fixable by adding '#include <array>'
    1 | #include<iostream>
  +++ |+#include <array>
    2 | using namespace std;
a.cc:8:9: error: 'sort' was not declared in this scope; did you mean 'short'?
    8 |         sort(nums);
      |         ^~~~
      |         short
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int main(){
	int x[3]={};
	for(int i=0;i<3;i++)
	cin>>x[i];
	sort(x.begin(),x.end());
	cout<<x[0]<<' '<<x[1]<<' '<<x[2]<<endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: request for member 'begin' in 'x', which is of non-class type 'int [3]'
    8 |         sort(x.begin(),x.end());
      |                ^~~~~
a.cc:8:26: error: request for member 'end' in 'x', which is of non-class type 'int [3]'
    8 |         sort(x.begin(),x.end());
      |                          ^~~
Language: C++

#include<iostream>
using namespace std;
int main(){
  int a[3];
  for(int i = 0; i < 3; i++) {
    cin >> a[i];
  }
  sort( a, a + 3);
  for(int i = 0; i < 3; i++) {
    cout << (i ? " " : "") << a[i];
  }
  cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'sort' was not declared in this scope; did you mean 'short'?
    8 |   sort( a, a + 3);
      |   ^~~~
      |   short
Language: C++

#include <iostream>
using namespace std;

int main() {
	int a,b,c;
	cin >>a>>b>>c;
	if(a<b && b<c){
		cout<<a<<" "<<b<<" "<<c<<endl;
	}else if(a<c && c<b){
		cout<<a<<" "<<c<<" "<<b<<endl;
	}else if(b<a && a<c){
		cout<<b<<" "<<a<<" "<<c<<endl;
	}else if(b<c && c<a){
		cout<<b<<" "<<c<<" "<<a<<endl;
	}else if(c<a && a<b){
		cout<<c<<" "<<a<<" "<<b<<endl;
	}else if(c<b && b<a){
		cout<<c<<" "<<b<<" "<<a<<endl;
	}
	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:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <stdio.h>

void swap(int &a, int &b) {
	int temp = 0;
	a = temp;
	a = b;
	b = temp;
}

int main(void) {
	int a = 0, b = 0, c = 0;
	scanf("%d %d, %d", &a[0], &b, &c);
	if (a > b) {
		swap(a, b);
	}
	if (b > c) {
		swap(b, c);
	}
	if (a > b) {
		swap(a, b);
	}
	printf("%d %d %d\n", a, b, c);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:30: error: invalid types 'int[int]' for array subscript
   12 |         scanf("%d %d, %d", &a[0], &b, &c);
      |                              ^
Language: C++

#include<iostream>
#include<algorithm>

int main(){
int a[3]

for(int i = 0; i < 3; i++)
std::cin >> a[i]

std::sort(high, high + 5);

for(int j = 0; j < 3; j++)
std:cout << a[j]
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:1: error: expected initializer before 'for'
    7 | for(int i = 0; i < 3; i++)
      | ^~~
a.cc:7:16: error: 'i' was not declared in this scope
    7 | for(int i = 0; i < 3; i++)
      |                ^
a.cc:13:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 | std:cout << a[j]
      |     ^~~~
      |     std::cout
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:13:13: error: 'a' was not declared in this scope
   13 | std:cout << a[j]
      |             ^
Language: Java

public class Main {
	public static void main(String[] args) throws IOException {
		for(int i=0;i<1000;i++)
			System.out.println("Hello World");
	}	
}

Compiler output:
Main.java:2: error: cannot find symbol
	public static void main(String[] args) throws IOException {
	                                              ^
  symbol:   class IOException
  location: class Main
1 error
Language: Java

public class PMHW{
    public static void main(String[] args){
        int i=0;
        while(i<1000){
            System.out.println("Hello World");
            i++;
        }
    }
}

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

import java.util.Scanner;

public class ManyHelloWorld {
	public static void main(String[] args){

		int i;

		for(i=0;i<1000;i++)
		System.out.println("Hello World");
	}
}

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

import java.util.Scanner;
 
public class Main{
    public static void main(String[] args){
    	int n = 0;
        while(n=1000){
        	System.out.println("Hello World");
        	n++;

        }
     }
 }

Compiler output:
Main.java:6: error: incompatible types: int cannot be converted to boolean
        while(n=1000){
               ^
1 error
Language: Java

import java.util.Scanner;
 
public class Main{
    public static void main(String[] args){
    	int n = ???;
        while(n<=1000){
        	System.out.println("Hello World");
        	n++;

        }
     }
 }

Compiler output:
Main.java:5: error: illegal start of expression
    	int n = ???;
    	        ^
Main.java:5: error: illegal start of expression
    	int n = ???;
    	         ^
Main.java:5: error: illegal start of expression
    	int n = ???;
    	          ^
Main.java:5: error: illegal start of expression
    	int n = ???;
    	           ^
4 errors
Language: Java

public class PrintManyHelloWorld {
public static void main(String[] args) {
int i;
for (i=0 ; i < 1000 ; i++){
System.out.println("Hello World"); }
}
}

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

import java.util.Scanner

public class Main{
public static void main(String[] args){
 int i
 for(i=0;i<1000;i++){
 System.out,println("Hello World\n");
 }
 }
 }
 

Compiler output:
Main.java:1: error: ';' expected
import java.util.Scanner
                        ^
Main.java:5: error: ';' expected
 int i
      ^
Main.java:7: error: not a statement
 System.out,println("Hello World\n");
       ^
Main.java:7: error: ';' expected
 System.out,println("Hello World\n");
           ^
4 errors
Language: Java

import java.util.Scanner;

public class Main{
public static void main(String[] args){
 int i;
 for(i=0;i<1000;i++){
 System.out,println("Hello World\n");
 }
 }
 }
 

Compiler output:
Main.java:7: error: not a statement
 System.out,println("Hello World\n");
       ^
Main.java:7: error: ';' expected
 System.out,println("Hello World\n");
           ^
2 errors
Language: Java

import java.util.Scanner;

public class Hello{
	public static void main(String[] args){
for(int i = 1;i<1000;i++){
	    System.out.println("Hello World");
}
}
}

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

public class While{
	public static void main(String[]args) {
	int i=0;
	while(i<1000){
	System.out.println("Hello,World!");
	i++;
	}
	System.out.println("end");
}
}

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

public class Repeat{
	public static void main(String[] args) {
		for(int i = 0; i < 1000; i++){
			System.out.println("Hello World");
		}
	}
}

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

import java.util.Scanner;
 class Main {
    public static void main(String[] args){
    	i=0;
    	for(i;i<=1000;i++){
    		System.out.printf("Hello World");
    	}

    }
}

Compiler output:
Main.java:5: error: not a statement
    	for(i;i<=1000;i++){
    	    ^
1 error
Language: Java

import java.util.*;
public class Main {
    public static void main(String[] args){
          int i=0;
          while(i<100){
            System.out.println(a+" "+b+" "+c);
            i++;
    }
  }
 }

Compiler output:
Main.java:6: error: cannot find symbol
            System.out.println(a+" "+b+" "+c);
                               ^
  symbol:   variable a
  location: class Main
Main.java:6: error: cannot find symbol
            System.out.println(a+" "+b+" "+c);
                                     ^
  symbol:   variable b
  location: class Main
Main.java:6: error: cannot find symbol
            System.out.println(a+" "+b+" "+c);
                                           ^
  symbol:   variable c
  location: class Main
3 errors
Language: Java

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

    for(int i==1;i<1000;i++){
      System.out.println("Hello World");
    }

  }
}

Compiler output:
Main.java:6: error: ';' expected
    for(int i==1;i<1000;i++){
             ^
Main.java:6: error: not a statement
    for(int i==1;i<1000;i++){
                  ^
Main.java:6: error: ')' expected
    for(int i==1;i<1000;i++){
                       ^
Main.java:6: error: ';' expected
    for(int i==1;i<1000;i++){
                           ^
4 errors
Language: Java


public class Main{
    public static void main(String args[]){
	for(int i=1; i=<1000; i++){
	    System.out.println("Hello World");
	}
    }
}

Compiler output:
Main.java:4: error: illegal start of type
	for(int i=1; i=<1000; i++){
	                ^
Main.java:4: error: ')' expected
	for(int i=1; i=<1000; i++){
	                    ^
Main.java:4: error: ';' expected
	for(int i=1; i=<1000; i++){
	                         ^
3 errors
Language: Java

public class Main {
	public static void main(String[] args) {
		int i;
		for (i = 0; i <??? 1000; i++)
			System.out.println("Hello world");
	}
}

Compiler output:
Main.java:4: error: illegal start of expression
		for (i = 0; i <??? 1000; i++)
		               ^
Main.java:4: error: illegal start of expression
		for (i = 0; i <??? 1000; i++)
		                ^
Main.java:4: error: illegal start of expression
		for (i = 0; i <??? 1000; i++)
		                 ^
Main.java:4: error: : expected
		for (i = 0; i <??? 1000; i++)
		                       ^
4 errors
Language: Java

import java.util.Scanner;

public class Main {

public static void main(String[] args) {

// 標準入力からデータを読み込む準備

Scanner sc = new Scanner(System.in);

// 最初の文字の固まりを整数値と想定して読み込む

for (int i = 1; i = 1000 ; i++) {

	System.out.printf("Hello World\n");

}

}

}

Compiler output:
Main.java:13: error: incompatible types: int cannot be converted to boolean
for (int i = 1; i = 1000 ; i++) {
                  ^
1 error
Language: Java

public class Main {
	public static void main(String[] args){
		for(i=0; i<1000; i++) System.out.println("Hello World");
	}
}

Compiler output:
Main.java:3: error: cannot find symbol
		for(i=0; i<1000; i++) System.out.println("Hello World");
		    ^
  symbol:   variable i
  location: class Main
Main.java:3: error: cannot find symbol
		for(i=0; i<1000; i++) System.out.println("Hello World");
		         ^
  symbol:   variable i
  location: class Main
Main.java:3: error: cannot find symbol
		for(i=0; i<1000; i++) System.out.println("Hello World");
		                 ^
  symbol:   variable i
  location: class Main
3 errors
Language: Java


public class a10005_PrintManyHelloWorld {
	public static void main(String[] args) {
		for (int i = 0; i < 1000; i++) {
			System.out.println("Hello World");
		}
	}
}

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

import java.util.Scanner;

public class Main{
     public static void main(String[] args){
          Scanner sc=new Scanner(System.in);
          for(int i = 0;i < 1000;i++){
           System.out.print("Hello World");
   }
}

Compiler output:
Main.java:9: 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);
          for(int i = 0; i < 1000; i++){
           System.out.print("Hello World");
   }
}

Compiler output:
Main.java:9: 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);
          for(int i = 0; i < 1000; i++){
           System.out.println("Hello World");
   }
}

Compiler output:
Main.java:9: 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);
          for(int i = 0; i < 1000; i++){
           System.out.println("i");
   }
         System.out.println("Hello World");
}

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

import java.util.Scanner;
public class Hello2{
	public static void main(String[] args){
		int i=0
		while(0<=i && i<1000){
			i++;
			System.out.printf("Hello World\n")
		}
	}
} 

Compiler output:
Main.java:4: error: ';' expected
		int i=0
		       ^
Main.java:7: error: ';' expected
			System.out.printf("Hello World\n")
			                                  ^
2 errors
Language: Java

import java.util.Scanner;

public class Main{
     public static void main(String[] args){
          Scanner sc=new Scanner(System.in);
          for(int i = 0; i < 1000; i++){
           System.out.println("i");
   }
         System.out.printf("Hello World");
}

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

import java.util.Scanner;
public class Main{
	public static void main(String[] args){
		int i=0
		while(0<=i && i<1000){
			i++;
			System.out.printf("Hello World\n")
		}
	}
} 

Compiler output:
Main.java:4: error: ';' expected
		int i=0
		       ^
Main.java:7: error: ';' expected
			System.out.printf("Hello World\n")
			                                  ^
2 errors
Language: Java

import java.util.Scanner;

public class Main{
     public static void main(String[] args){
          Scanner sc=new Scanner(System.in);
          for(int i = 0; i < 1000; i++){
         System.out.printf("Hello World");
   }
}

Compiler output:
Main.java:9: 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);
          for(int i = 0; i < 1000; i++){
         System.out.println("Hello World");
   }
}

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

public class Main{
	public static void main(String[] args){
		for(i=0;i<1000;i++){
			System.out.println("Hello World");
		}
}
}

Compiler output:
Main.java:3: error: cannot find symbol
		for(i=0;i<1000;i++){
		    ^
  symbol:   variable i
  location: class Main
Main.java:3: error: cannot find symbol
		for(i=0;i<1000;i++){
		        ^
  symbol:   variable i
  location: class Main
Main.java:3: error: cannot find symbol
		for(i=0;i<1000;i++){
		               ^
  symbol:   variable i
  location: class Main
3 errors
Language: Java

public class enthree {
	public static void main(String[] args) {
		for (int i = 0; i < 1000; i++) {
			System.out.printf("Hello World\n");
		}
	}
}

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

public class Main{
public static void main(String[] args){
for(int i = 0; i =< 1000; i++){
System.out.println("Hello World");
}
}
}

Compiler output:
Main.java:3: error: illegal start of type
for(int i = 0; i =< 1000; i++){
                    ^
Main.java:3: error: ')' expected
for(int i = 0; i =< 1000; i++){
                        ^
Main.java:3: error: ';' expected
for(int i = 0; i =< 1000; i++){
                             ^
3 errors