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

#include<stdio.h>
int main(){int a,b;char c[2];while(scanf("%d%s%d",&a,c,&b),c[0]-63)printf("%d\n",(c[0]-43)?(c[0]-45)?(c[0]-42)?(a\b):(a*b):(a-b):(a+b));}

Compiler output:
a.cc:2:114: error: stray '\' in program
    2 | int main(){int a,b;char c[2];while(scanf("%d%s%d",&a,c,&b),c[0]-63)printf("%d\n",(c[0]-43)?(c[0]-45)?(c[0]-42)?(a\b):(a*b):(a-b):(a+b));}
      |                                                                                                                  ^
a.cc: In function 'int main()':
a.cc:2:114: error: expected ')' before 'b'
    2 | int main(){int a,b;char c[2];while(scanf("%d%s%d",&a,c,&b),c[0]-63)printf("%d\n",(c[0]-43)?(c[0]-45)?(c[0]-42)?(a\b):(a*b):(a-b):(a+b));}
      |                                                                                                                ~ ^~
      |                                                                                                                  )
a.cc:2:136: error: expected ':' before ';' token
    2 | int main(){int a,b;char c[2];while(scanf("%d%s%d",&a,c,&b),c[0]-63)printf("%d\n",(c[0]-43)?(c[0]-45)?(c[0]-42)?(a\b):(a*b):(a-b):(a+b));}
      |                                                                                                                                        ^
      |                                                                                                                                        :
a.cc:2:136: error: expected primary-expression before ';' token
a.cc:2:136: error: expected ':' before ';' token
    2 | int main(){int a,b;char c[2];while(scanf("%d%s%d",&a,c,&b),c[0]-63)printf("%d\n",(c[0]-43)?(c[0]-45)?(c[0]-42)?(a\b):(a*b):(a-b):(a+b));}
      |                                                                                                                                        ^
      |                                                                                                                                        :
a.cc:2:136: error: expected primary-expression before ';' token
a.cc:2:136: error: expected ':' before ';' token
    2 | int main(){int a,b;char c[2];while(scanf("%d%s%d",&a,c,&b),c[0]-63)printf("%d\n",(c[0]-43)?(c[0]-45)?(c[0]-42)?(a\b):(a*b):(a-b):(a+b));}
      |                                                                                                                                        ^
      |                                                                                                                                        :
a.cc:2:136: error: expected primary-expression before ';' token
Language: C++

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

int main()
{
string op1("+"), op2("-"), op3("*"), op4("/"), op0("?");
while(true) {
int a, b;
char str[32];
scanf("%d%s%d", &a, str, &b);
if(str == op0)
break;
if(str == op1) ans = a + b;
if(str == op2) ans = a - b;
if(str == op3) ans = a * b;
if(str == op4) ans = a / b;
printf("%d\n", ans);
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:16: error: 'ans' was not declared in this scope; did you mean 'abs'?
   14 | if(str == op1) ans = a + b;
      |                ^~~
      |                abs
a.cc:15:16: error: 'ans' was not declared in this scope; did you mean 'abs'?
   15 | if(str == op2) ans = a - b;
      |                ^~~
      |                abs
a.cc:16:16: error: 'ans' was not declared in this scope; did you mean 'abs'?
   16 | if(str == op3) ans = a * b;
      |                ^~~
      |                abs
a.cc:17:16: error: 'ans' was not declared in this scope; did you mean 'abs'?
   17 | if(str == op4) ans = a / b;
      |                ^~~
      |                abs
a.cc:18:16: error: 'ans' was not declared in this scope; did you mean 'abs'?
   18 | printf("%d\n", ans);
      |                ^~~
      |                abs
Language: C++

#include<stdio.h>

int main(void){

	int x,y,;
	cher op;
	
	while(1){
		scanf("%d %c %d",&x,&op,&y);
	
		if(op=='+')
			printf("%d\n",x+y);
		else if(op=='-')
			printf("%d\n",x-y);
		else if(op=='*')
			printf("%d\n",x*y);
		else if(op=='/')
			printf("%d\n",x/y);
		else break;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:17: error: expected unqualified-id before ';' token
    5 |         int x,y,;
      |                 ^
a.cc:6:9: error: 'cher' was not declared in this scope; did you mean 'char'?
    6 |         cher op;
      |         ^~~~
      |         char
a.cc:9:38: error: 'op' was not declared in this scope
    9 |                 scanf("%d %c %d",&x,&op,&y);
      |                                      ^~
Language: C++

#include<stdio.h>

int main(void){

	int x,y,;
	char op;
	
	while(1){
		scanf("%d %c %d",&x,&op,&y);
	
		if(op=='+')
			printf("%d\n",x+y);
		else if(op=='-')
			printf("%d\n",x-y);
		else if(op=='*')
			printf("%d\n",x*y);
		else if(op=='/')
			printf("%d\n",x/y);
		else break;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:17: error: expected unqualified-id before ';' token
    5 |         int x,y,;
      |                 ^
Language: C++

#include <stdio.h>
#define PI 3.14159

int main (void) {
    int a, b;
    char op;
    int res;

    while (1) {
        scanf("%d%c%d", &a, &op, &b);
        if (op == '?') break;

        switch (op) {
            case '+': res = a+b; break;
            case '-': res = a - b; break;
            case '*': res = a * b; break;
            case '/': res = a / b; break;
            default: break;
        }
         puts(res);
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:15: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
   20 |          puts(res);
      |               ^~~
      |               |
      |               int
In file included from a.cc:1:
/usr/include/stdio.h:714:30: note:   initializing argument 1 of 'int puts(const char*)'
  714 | extern int puts (const char *__s);
      |                  ~~~~~~~~~~~~^~~
Language: C++

#include<iostream>
using namespace std;

int main(){
int a,b;
char c;
while(cin >> a >> c >> b, c!='?'){
if(c=='+')cout << a+b << endl;
if(c=='-')cout << a-b << endl;
if(c=='*')cout << a*b << endl;
if(c=='/')cout << a/b << endl;
}

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

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

int main()
{
int x,y;
char op;
while(cin>>x>>op>>y)
{
if(op == '+')
{
cout<<x+y<<endl;
}
elseif(op== '-')
{
cout<<x-y<<endl;
}
elseif(op == '*')
{
cout<<x*y<<endl;
}
elseif(op == '/')
{
cout<<x/y<<endl;
}
else {break;}
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:1: error: 'elseif' was not declared in this scope
   16 | elseif(op== '-')
      | ^~~~~~
a.cc:28:1: error: 'else' without a previous 'if'
   28 | else {break;}
      | ^~~~
Language: C++

#include<cstdio>
#include<iostream>
#include<algorithm>
#include<string>
#include<cmath>
#include<vector>

using namespace std;


int main()
{
  int a, b, ans;
  char op;
  while(true)
  {
    cin >> a >> op >> b;
    switch(op)
    {
    case '?':
      goto end;
    case '+':
      ans = a +	b;
      break;
    case '-':
      ans = a -	b;
      break;
    case  '*':
      ans = a *	b;
      break;
    case '/':
      ans = a /	b;
      break;
    }
    cout << ans	<< endl;
  }
 end:
  return 0;

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

#include <iostream>
using namespace std;

int main(){
	int a, b;
	char op[2];
	while(1){
		cin >> a >> op >> b;
		if(op == "?")
			break;
		switch(op){
			case "+"
				cout << a + b << "\n";
				swbreak;
			case "-"
				cout << a - b << "\n";
				swbreak;
			case "*"
				cout << a * b << "\n";
				swbreak;
			case "/"
				cout << a / b << "\n";
				swbreak;
		}
	}
	cout << flush;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:24: error: switch quantity not an integer
   11 |                 switch(op){
      |                        ^~
a.cc:12:33: error: expected ':' before 'cout'
   12 |                         case "+"
      |                                 ^
      |                                 :
   13 |                                 cout << a + b << "\n";
      |                                 ~~~~
a.cc:14:33: error: 'swbreak' was not declared in this scope
   14 |                                 swbreak;
      |                                 ^~~~~~~
a.cc:15:33: error: expected ':' before 'cout'
   15 |                         case "-"
      |                                 ^
      |                                 :
   16 |                                 cout << a - b << "\n";
      |                                 ~~~~
a.cc:18:33: error: expected ':' before 'cout'
   18 |                         case "*"
      |                                 ^
      |                                 :
   19 |                                 cout << a * b << "\n";
      |                                 ~~~~
a.cc:21:33: error: expected ':' before 'cout'
   21 |                         case "/"
      |                                 ^
      |                                 :
   22 |                                 cout << a / b << "\n";
      |                                 ~~~~
Language: C++

#include <iostream>
using namespace std;

int main(){
	int a, b;
	char op[2];
	while(1){
		cin >> a >> op >> b;
		if(op == "?")
			break;
		switch(op){
			case "+"
				cout << a + b << "\n";
				break;
			case "-"
				cout << a - b << "\n";
				break;
			case "*"
				cout << a * b << "\n";
				break;
			case "/"
				cout << a / b << "\n";
				break;
		}
	}
	cout << flush;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:24: error: switch quantity not an integer
   11 |                 switch(op){
      |                        ^~
a.cc:12:33: error: expected ':' before 'cout'
   12 |                         case "+"
      |                                 ^
      |                                 :
   13 |                                 cout << a + b << "\n";
      |                                 ~~~~
a.cc:15:33: error: expected ':' before 'cout'
   15 |                         case "-"
      |                                 ^
      |                                 :
   16 |                                 cout << a - b << "\n";
      |                                 ~~~~
a.cc:18:33: error: expected ':' before 'cout'
   18 |                         case "*"
      |                                 ^
      |                                 :
   19 |                                 cout << a * b << "\n";
      |                                 ~~~~
a.cc:21:33: error: expected ':' before 'cout'
   21 |                         case "/"
      |                                 ^
      |                                 :
   22 |                                 cout << a / b << "\n";
      |                                 ~~~~
Language: C++

#include <iostream>
using namespace std;
int main()
{
	int a;
	int b;
	char op;
	while(true){
	cin >> a >> op >> b;
	if(op=='+'){
		cout << a+b << endl;
	}else if(op=='-'){
		cout << a-b << endl;
	}else if(op=='*'){
		cout << a*b << endl;
	}else if(op==/){
		cout << a/b << endl;
	}else if(op=='?'){
	break}
	}return 0;
}#include <iostream>
using namespace std;
int main()
{
	int a;
	int b;
	char op;
	while(true){
	cin >> a >> op >> b;
	if(op=='+'){
		cout << a+b << endl;
	}else if(op=='-'){
		cout << a-b << endl;
	}else if(op=='*'){
		cout << a*b << endl;
	}else if(op==/){
		cout << a/b << endl;
	}else if(op=='?'){
	break}
	}return 0;
}

Compiler output:
a.cc:21:2: error: stray '#' in program
   21 | }#include <iostream>
      |  ^
a.cc: In function 'int main()':
a.cc:16:22: error: expected primary-expression before '/' token
   16 |         }else if(op==/){
      |                      ^
a.cc:16:23: error: expected primary-expression before ')' token
   16 |         }else if(op==/){
      |                       ^
a.cc:19:14: error: expected ';' before '}' token
   19 |         break}
      |              ^
      |              ;
a.cc: At global scope:
a.cc:21:3: error: 'include' does not name a type
   21 | }#include <iostream>
      |   ^~~~~~~
a.cc:23:5: error: redefinition of 'int main()'
   23 | int main()
      |     ^~~~
a.cc:3:5: note: 'int main()' previously defined here
    3 | int main()
      |     ^~~~
a.cc: In function 'int main()':
a.cc:36:22: error: expected primary-expression before '/' token
   36 |         }else if(op==/){
      |                      ^
a.cc:36:23: error: expected primary-expression before ')' token
   36 |         }else if(op==/){
      |                       ^
a.cc:39:14: error: expected ';' before '}' token
   39 |         break}
      |              ^
      |              ;
Language: C++

#include <iostream>
using namespace std;
int main()
{
	int a;
	int b;
	char op;
	while(true){
	cin >> a >> op >> b;
	if(op=='+'){
		cout << a+b << endl;
	}else if(op=='-'){
		cout << a-b << endl;
	}else if(op=='*'){
		cout << a*b << endl;
	}else if(op==/){
		cout << a/b << endl;
	}else if(op=='?'){
	break;
	}}return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:22: error: expected primary-expression before '/' token
   16 |         }else if(op==/){
      |                      ^
a.cc:16:23: error: expected primary-expression before ')' token
   16 |         }else if(op==/){
      |                       ^
Language: C++

#include <numeric>
#include <utility>
#include <iomanip>
#include <cstdio>
#include <cctype>
#include <queue>
#include <complex>
#include <climits>

#define M_PI 3.14159265358979
#define rep(i, n) for (int i = 0; i < int(n); ++i)

using namespace std;

int main(void){
	int a,b;
	char c;

	cin >> a >> c >> b;
	switch(c){
	case '+':
		cout << a + b << endl;
		break;
	case '-':
		cout << a - b << endl;
		break;
	case '*':
		cout << a * b << endl;
		break;
	case '/':
		cout << a / b << endl;
		break;
	case '?':
		break;
	default:
		break;
	}
	return 0;
}

Compiler output:
a.cc:10:9: warning: "M_PI" redefined
   10 | #define M_PI 3.14159265358979
      |         ^~~~
In file included from /usr/include/c++/14/cmath:47,
                 from /usr/include/c++/14/complex:44,
                 from a.cc:7:
/usr/include/math.h:1121:10: note: this is the location of the previous definition
 1121 | # define M_PI           3.14159265358979323846  /* pi */
      |          ^~~~
a.cc: In function 'int main()':
a.cc:19:9: error: 'cin' was not declared in this scope
   19 |         cin >> a >> c >> b;
      |         ^~~
a.cc:9:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    8 | #include <climits>
  +++ |+#include <iostream>
    9 | 
a.cc:22:17: error: 'cout' was not declared in this scope
   22 |                 cout << a + b << endl;
      |                 ^~~~
a.cc:22:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include <iostream>

using namespace std;

int main (){
	int a,b;
	char op;
	while(1){

		cin>>a>>op>>b;

		if(op==?)break;
		else if (op==+)cout<<a+b<<endl;
		else if (op==-)cout<<a-b<<endl;
		else if (op==/)cout<<a/b<<endl;
		else if (op==*)cout<<a*b<<endl;



}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:24: error: expected primary-expression before '?' token
   12 |                 if(op==?)break;
      |                        ^
a.cc:12:25: error: expected primary-expression before ')' token
   12 |                 if(op==?)break;
      |                         ^
a.cc:12:25: error: expected ':' before ')' token
   12 |                 if(op==?)break;
      |                         ^
      |                         :
a.cc:12:25: error: expected primary-expression before ')' token
a.cc:13:31: error: expected primary-expression before ')' token
   13 |                 else if (op==+)cout<<a+b<<endl;
      |                               ^
a.cc:14:31: error: expected primary-expression before ')' token
   14 |                 else if (op==-)cout<<a-b<<endl;
      |                               ^
a.cc:15:30: error: expected primary-expression before '/' token
   15 |                 else if (op==/)cout<<a/b<<endl;
      |                              ^
a.cc:15:31: error: expected primary-expression before ')' token
   15 |                 else if (op==/)cout<<a/b<<endl;
      |                               ^
a.cc:16:31: error: expected primary-expression before ')' token
   16 |                 else if (op==*)cout<<a*b<<endl;
      |                               ^
a.cc:20:2: error: expected '}' at end of input
   20 | }
      |  ^
a.cc:5:12: note: to match this '{'
    5 | int main (){
      |            ^
Language: C++

#include <iostream>

using namespace std;

int main (){
	int a,b;
	char op;
	while(1){

		cin>>a>>op>>b;

		if(op=='?') break;
		else if (op=='+') cout<<a+b<<endl;
		else if (op=='-') cout<<a-b<<endl;
		else if (op=='/') cout<<a/b<<endl;
		else if (op=='*') cout<<a*b<<endl;



}

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

int main(){
	int a,b,ans;
	char x;
	while(1){
		cin>>a>>x>>b;
		if(x=='?')break;
		else if(x=='+')ans=a+b;
		else if(x=='-')ans=a-b;
		else if(x=='*')ans=a*b;
		else if(x=='/')ans=a/b;
		cout<<ans<<endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:17: error: 'cin' was not declared in this scope
    5 |                 cin>>a>>x>>b;
      |                 ^~~
a.cc:11:17: error: 'cout' was not declared in this scope
   11 |                 cout<<ans<<endl;
      |                 ^~~~
a.cc:11:28: error: 'endl' was not declared in this scope
   11 |                 cout<<ans<<endl;
      |                            ^~~~
Language: C++

#include <iostream>
using namespace std;

int main(void)
{
	int x,y,a,f=0;
	do{
	cin >>x >>a >>y;
	switch(a)
	{
	case +:
		cout << a+b;
	case -:
		cout << a-b;
	case *:
		cout << a*b;
	case /:
		cout << a/b;
	case ?:
		f=1;	
	 }while(f=0;)
	       		
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:15: error: expected primary-expression before ':' token
   11 |         case +:
      |               ^
a.cc:12:27: error: 'b' was not declared in this scope
   12 |                 cout << a+b;
      |                           ^
a.cc:13:15: error: expected primary-expression before ':' token
   13 |         case -:
      |               ^
a.cc:15:15: error: expected primary-expression before ':' token
   15 |         case *:
      |               ^
a.cc:17:14: error: expected primary-expression before '/' token
   17 |         case /:
      |              ^
a.cc:17:15: error: expected primary-expression before ':' token
   17 |         case /:
      |               ^
a.cc:19:14: error: expected primary-expression before '?' token
   19 |         case ?:
      |              ^
a.cc:20:20: error: expected ':' before ';' token
   20 |                 f=1;
      |                    ^
      |                    :
a.cc:21:20: error: expected ')' before ';' token
   21 |          }while(f=0;)
      |                ~   ^
      |                    )
a.cc:21:21: error: expected primary-expression before ')' token
   21 |          }while(f=0;)
      |                     ^
a.cc:24:2: error: expected 'while' at end of input
   24 | }
      |  ^
a.cc:24:2: error: expected '(' at end of input
   24 | }
      |  ^
      |  (
a.cc:24:2: error: expected primary-expression at end of input
a.cc:24:2: error: expected ')' at end of input
   24 | }
      |  ^
      |  )
a.cc:24:2: error: expected ';' at end of input
   24 | }
      |  ^
      |  ;
a.cc:24:2: error: expected '}' at end of input
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

#include <iostream>
using namespace std;

int main()
{
	int a[10000], c[10000];
	char b[10000];
	for(int i = 0; i < 10000; i+;){
		cin >> a[i] >> b[i] >> c[i];
		if(b[i] == "+")
			cout << a[i] + c[i] << endl;
		else if(b[i] == "-")
			cout << a[i] - c[i] << endl;
		else if(b[i] == "*")
			cout << a[i] * c[i] << endl;
		else if(b[i] == "/")
			cout << a[i] / b[i] << endl;
		else
		    break;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:37: error: expected primary-expression before ';' token
    8 |         for(int i = 0; i < 10000; i+;){
      |                                     ^
a.cc:8:37: error: expected ')' before ';' token
    8 |         for(int i = 0; i < 10000; i+;){
      |            ~                        ^
      |                                     )
a.cc:8:38: error: expected primary-expression before ')' token
    8 |         for(int i = 0; i < 10000; i+;){
      |                                      ^
Language: C++

#include <iostream>
using namespace std;

int main()
{
	int a[10000], c[10000];
	char b[10000];
	for(int i = 0; i < 10000; i+;){
		cin >> a[i] >> b[i] >> c[i];
		if(b[i] == "+")
			cout << a[i] + c[i] << endl;
		else if(b[i] == "-")
			cout << a[i] - c[i] << endl;
		else if(b[i] == "*")
			cout << a[i] * c[i] << endl;
		else if(b[i] == "/")
			cout << a[i] / c[i] << endl;
		else
		    break;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:37: error: expected primary-expression before ';' token
    8 |         for(int i = 0; i < 10000; i+;){
      |                                     ^
a.cc:8:37: error: expected ')' before ';' token
    8 |         for(int i = 0; i < 10000; i+;){
      |            ~                        ^
      |                                     )
a.cc:8:38: error: expected primary-expression before ')' token
    8 |         for(int i = 0; i < 10000; i+;){
      |                                      ^
Language: C++

#include <iostream>
using namespace std;

int main()
{
	int a[10000], c[10000];
	char b[10000];
	for(int i = 0; i < 10000; i++){
		cin >> a[i] >> b[i] >> c[i];
		if(b[i] == "+")
			cout << a[i] + c[i] << endl;
		else if(b[i] == "-")
			cout << a[i] - c[i] << endl;
		else if(b[i] == "*")
			cout << a[i] * c[i] << endl;
		else if(b[i] == "/")
			cout << a[i] / c[i] << endl;
		else
		    break;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:25: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |                 if(b[i] == "+")
      |                    ~~~~~^~~~~~
a.cc:12:30: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |                 else if(b[i] == "-")
      |                         ~~~~~^~~~~~
a.cc:14:30: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |                 else if(b[i] == "*")
      |                         ~~~~~^~~~~~
a.cc:16:30: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |                 else if(b[i] == "/")
      |                         ~~~~~^~~~~~
Language: C++

#include<iostream>
#include<stdio.h>
#include<conio.h>
using namespace std;
int add(float a,float b)
{
    return (a+b);
}
int minu(float a,float b)
{
    return (a-b);
}
int m(float a,float b)
{
    return (a*b);
}
int d(float a,float b)
{
    return (a/b);
}

int main()
{
    float a,b;char x;

    while(1)
    {
    cin>>a>>x>>b;
    //x=getchar();
    //cin>>b;
    //cout<<x;


    if(x=='+')cout<<add(a,b)<<endl;
    else if(x=='-')cout<<minu(a,b)<<endl;
    else if(x=='*')cout<<m(a,b)<<endl;
    else if(x=='/')cout<<d(a,b)<<endl;
    else if(x=='?')break;
    }
    cout<<endl;
    return 0;



}

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

#include<iostream>
#include<stdio.h>
#include<conio.h>
using namespace std;
int add(float a,float b)
{
    return (a+b);
}
int minu(float a,float b)
{
    return (a-b);
}
int m(float a,float b)
{
    return (a*b);
}
int d(float a,float b)
{
    return (a/b);
}

int main()
{
    float a,b;char x;

    while(1)
    {
    cin>>a>>x>>b;
    if(x=='+')cout<<add(a,b)<<endl;
    else if(x=='-')cout<<minu(a,b)<<endl;
    else if(x=='*')cout<<m(a,b)<<endl;
    else if(x=='/')cout<<d(a,b)<<endl;
    else if(x=='?')break;
    }
    return 0;



}

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

#include<iostream>
#include<cstdio>
main(){
	int a,b,op;
op=0;
	while(op=?){
		cin>>a>>op>>b;
		cout<<a op b;
		
	
	}
	return 0;

}

Compiler output:
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:6:18: error: expected primary-expression before '?' token
    6 |         while(op=?){
      |                  ^
a.cc:6:19: error: expected primary-expression before ')' token
    6 |         while(op=?){
      |                   ^
a.cc:6:19: error: expected ':' before ')' token
    6 |         while(op=?){
      |                   ^
      |                   :
a.cc:6:19: error: expected primary-expression before ')' token
a.cc:7:17: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |                 cin>>a>>op>>b;
      |                 ^~~
      |                 std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:8:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |                 cout<<a op b;
      |                 ^~~~
      |                 std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: Java

import java.io.IOException;
import java.util.Scanner;

class Main{
    public static void main(String[] args) throws IOException{
        Scanner in = new Scanner(System.in);
        int length = in.nextInt();
        int[] numbers = new int[length];

        int i=0;
        do{
            numbers[i] = in.nextInt();
        }while(++i<length);
        while(--i=i){
            System.out.print(numbers[i]);
            if(i > 0){
                System.out.print(" ");
            }
            else{
                break;
            }
        }
    }
}

Compiler output:
Main.java:14: error: unexpected type
        while(--i=i){
              ^
  required: variable
  found:    value
1 error
Language: Java

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

public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int a[] = new int[n];
		int i;
		for(i=0;i<n;i++){
			a[i] = sc.nextInt();
		}
		Collections.sort(a);
		Collections.reverse(a);
		i=0;
		while(i<n-1){
			System.out.print(a[]+" ");
			i++;
		}
		System.out.println(a[n-1]);
		
	}
}

Compiler output:
Main.java:17: error: '.class' expected
			System.out.print(a[]+" ");
			                    ^
1 error
Language: Java

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

public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int a[] = new int[n];
		int i;
		for(i=0;i<n;i++){
			a[i] = sc.nextInt();
		}
		Collections.sort(a);
		Collections.reverse(a);
		i=0;
		while(i<n-1){
			System.out.print(a[i]+" ");
			i++;
		}
		System.out.println(a[n-1]);
		
	}
}

Compiler output:
Main.java:13: error: no suitable method found for sort(int[])
		Collections.sort(a);
		           ^
    method Collections.<T#1>sort(List<T#1>) is not applicable
      (cannot infer type-variable(s) T#1
        (argument mismatch; int[] cannot be converted to List<T#1>))
    method Collections.<T#2>sort(List<T#2>,Comparator<? super T#2>) is not applicable
      (cannot infer type-variable(s) T#2
        (actual and formal argument lists differ in length))
  where T#1,T#2 are type-variables:
    T#1 extends Comparable<? super T#1> declared in method <T#1>sort(List<T#1>)
    T#2 extends Object declared in method <T#2>sort(List<T#2>,Comparator<? super T#2>)
Main.java:14: error: incompatible types: int[] cannot be converted to List<?>
		Collections.reverse(a);
		                    ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
2 errors
Language: Java

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

public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int a[] = new int[n];
		int i;
		for(i=0;i<n;i++){
			a[i] = sc.nextInt();
		}
		Collections.sort(a);
		Collections.reverse(a);
		i=0;
		while(i<n-1){
			System.out.print(a[i]+" ");
			i++;
		}
		System.out.println(a[n-1]);
		
	}
}

Compiler output:
Main.java:14: error: no suitable method found for sort(int[])
		Collections.sort(a);
		           ^
    method Collections.<T#1>sort(List<T#1>) is not applicable
      (cannot infer type-variable(s) T#1
        (argument mismatch; int[] cannot be converted to List<T#1>))
    method Collections.<T#2>sort(List<T#2>,Comparator<? super T#2>) is not applicable
      (cannot infer type-variable(s) T#2
        (actual and formal argument lists differ in length))
  where T#1,T#2 are type-variables:
    T#1 extends Comparable<? super T#1> declared in method <T#1>sort(List<T#1>)
    T#2 extends Object declared in method <T#2>sort(List<T#2>,Comparator<? super T#2>)
Main.java:15: error: incompatible types: int[] cannot be converted to List<?>
		Collections.reverse(a);
		                    ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
2 errors
Language: Java

import java.util.*;

public class Aoj10011_join {
    public static void main(String[] args){
        Scanner input = new Scanner(System.in);
        input.nextLine();
        List<String> a = Arrays.asList(input.nextLine().split(" "));
        Collections.reverse(a);
        System.out.println(String.join(" ", a));
    }
}

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

import java.util.Scanner;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n;
    n = sc.nextInt();
    int [] a = new int[n];
    for (int i = 0: i < n: i++) {
      a[i] = sc.nextInt();
    }
    System.out.println(a);
  }
}

Compiler output:
Main.java:8: error: ';' expected
    for (int i = 0: i < n: i++) {
                  ^
Main.java:8: error: > or ',' expected
    for (int i = 0: i < n: i++) {
                         ^
Main.java:8: error: not a statement
    for (int i = 0: i < n: i++) {
                      ^
Main.java:8: error: ';' expected
    for (int i = 0: i < n: i++) {
                              ^
4 errors
Language: Java

import java.util.Scanner;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n;
    n = sc.nextInt();
    int [] a = new int[n];
    for (int i = 0; i < n; i++) {
      a[i] = sc.nextInt();
    }
    System.out.print(a[0])
    for (int i = 1; i < n; i++) {
      System.out.print(" "+a[n-i-1]);
    }
  }
}

Compiler output:
Main.java:11: error: ';' expected
    System.out.print(a[0])
                          ^
1 error
Language: Java

import java.util.Scanner;

class Main
{
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.nextLine());
		String[] str = sc.nextLine().split(" ");
		
		for (int i = -n; i >= 0; i--)
		{
			int a = str[i];
			if (i = 0)
			{
				System.out.println(a);
			}
			else
			{
				System.out.print(a);
			}
		}
	}
}

Compiler output:
Main.java:13: error: incompatible types: String cannot be converted to int
			int a = str[i];
			           ^
Main.java:14: error: incompatible types: int cannot be converted to boolean
			if (i = 0)
			      ^
2 errors
Language: Java

import java.util.Collections;
import java.util.List;

class Main
{
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.nextLine());
		String[] str = sc.nextLine().split(" ");
		List list = Arrays.asList(str);
		Collections.reverse(list);
		str = list.toArrays(new String[0]);
		
		for (int i = 0; i < n; i++)
		{
			if (i == n - 1)
			{
				System.out.println(str[i]);
			}
			else
			{
				System.out.print(str[i]);
			}
		}
	}
}

Compiler output:
Main.java:8: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:8: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
Main.java:11: error: cannot find symbol
		List list = Arrays.asList(str);
		            ^
  symbol:   variable Arrays
  location: class Main
Main.java:13: error: cannot find symbol
		str = list.toArrays(new String[0]);
		          ^
  symbol:   method toArrays(String[])
  location: variable list of type List
4 errors
Language: Java

import java.util.Scanner;
import java.util.Collections;
import java.util.List;

class Main
{
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.nextLine());
		String[] str = sc.nextLine().split(" ");
		List list = Arrays.asList(str);
		Collections.reverse(list);
		str = list.toArrays(new String[0]);
		
		for (int i = 0; i < n; i++)
		{
			if (i == n - 1)
			{
				System.out.println(str[i]);
			}
			else
			{
				System.out.print(str[i]);
			}
		}
	}
}

Compiler output:
Main.java:12: error: cannot find symbol
		List list = Arrays.asList(str);
		            ^
  symbol:   variable Arrays
  location: class Main
Main.java:14: error: cannot find symbol
		str = list.toArrays(new String[0]);
		          ^
  symbol:   method toArrays(String[])
  location: variable list of type List
2 errors
Language: Java

import java.util.Scanner;
import java.util.Collections;
import java.util.List;
import java.util.Arrays;

class Main
{
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.nextLine());
		String[] str = sc.nextLine().split(" ");
		List list = Arrays.asList(str);
		Collections.reverse(list);
		str = list.toArray(new String[0]);
		
		for (int i = 0; i < n; i++)
		{
			if (i == n - 1)
			{
				System.out.println(str[i]);
			}
			else
			{
				System.out.print(str[i]);
			}
		}
	}
}

Compiler output:
Main.java:15: error: incompatible types: Object[] cannot be converted to String[]
		str = list.toArray(new String[0]);
		                  ^
Note: Main.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
Language: Java

import java.util.Scanner;
import java.util.Arrays; 

class Main
{
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.nextLine());
		String[] str = sc.nextLine().split(" ");
		String[] result = new String[n];
		for(int i = 0; i < n; i++)
		{
			result[i] = str[(n - 1) - i] + " ";
		}
		System.out.println(Arrays.toString(result).trim());
	}

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

import java.util.Scanner;

class Main
{
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.nextLine());
		String[] str = sc.nextLine().split(" ");
		StringBuilder sb = new StringBuider();
		for(int i = 0; i < n; i++)
		{
			sb.append(str[(n - 1) - i]);
			sb.append(" ");
		}
		System.out.println(sb.toString().trim());
	}
}

Compiler output:
Main.java:10: error: cannot find symbol
		StringBuilder sb = new StringBuider();
		                       ^
  symbol:   class StringBuider
  location: class Main
1 error
Language: Java

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int[] aArray = new int[n];
        int i;
        
        for(i = 0; i < n; i++) {
            aArray[i] = scanner.nextInt();
        }
        
        reverseIntArray(aArray);
        
        for(i = n - 1; i > 1; i--) {
            System.out.print(aArray[i] + " ");
        }
        System.out.println(aArray[0]);
    }
}

Compiler output:
Main.java:14: error: cannot find symbol
        reverseIntArray(aArray);
        ^
  symbol:   method reverseIntArray(int[])
  location: class Main
1 error
Language: Java

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


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

		try {
			int n = Integer.parseInt(br.readLine());

			String[] stringArray = br.readLine().split(" ");

			ArrayList<String> list = new ArrayList<String>(n);

			for(String s: stringArray){
				list.add(s);
			}

			Collections.reverse(list);

			for(int i=0;i<n-1;i++){
				System.out.print(list.get(i) + " ");
			}
			System.out.print(list.get(n-1));

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


	}
}

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

import java.util.Scanner;

public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		int[] a= new int [n];
		int i=0;
		for(i=0; i<n; i++){
			a[i]=sc.nextInt();
		}
		for(i=0; i<a.length/2; i++){
			int work;
			work=a[i];
			a[i]=a[a.length-1-i];
			a[a.length-1-i]=work;
		}	
		for(i=0; i<a.length; i++){
			if(i!=a.length-1){
				System.out.print(a[i]+" ");
			}else{
				System.out.print(a[i]);
			}
		}

	}

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

import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int n=sc.nextInt();
		int[] a=new int[n];
		for(int i=0;i<n;i++){
			a[i]=sc.nextInt();
		}
		for(int i=n-1;i>=0;i--){
			System.out.print(a[i]);
		}
		System.out.println();
	}
}
}

Compiler output:
Main.java:16: error: class, interface, enum, or record expected
}
^
1 error
Language: Java

import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

public class a
{
	public static void main(String... args) throws Exception
	{
		int n = new Scanner(System.in).nextInt();
		String[] arr = new Scanner(System.in).nextLine().split(" ");
		List<String> l = Arrays.asList(arr);
		Collections.reverse(l);
		for(int i = 0; i < n; i++)
		{
			System.out.print(l.get(i));
			System.out.print(i == n - 1 ? System.getProperty("line.separator") : " ");
		}
	}
}

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

mport java.util.*;
class Main {
    public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int[] list = new int[n];
    for(int i = 0; i<n; i++)list[i] = sc.nextInt();
    for(int i = 0; i<n; i++){ 
	System.out.print(list[n-i-1]);
	if(i != n-1)System.out.print(" ");
    }
    System.out.println();
    }
}

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
mport java.util.*;
^
1 error
Language: Java

mport java.util.Arrays;
import java.util.Scanner;

public class Main{
	public static void main(String[] args) throws Exception{
	Scanner scan = new Scanner(System.in);
	int num = scan.nextInt();
	int out[] = new int[num];
	for (int i = num - 1;i >= 0 ;i--) {
		out[i] = scan.nextInt();
	}
	for (int i = 0;i < num - 1;i++) {
		System.out.print(out[i]+ " ");
	}
	System.out.println(out[num-1]);
	}
}

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
mport java.util.Arrays;
^
Main.java:2: error: class, interface, enum, or record expected
import java.util.Scanner;
^
2 errors
Language: Java

import java.util.Scanner;
public class No10011 {
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int n =sc.nextInt();
		int[] a =new int[n];
		for(int i=0;i<n;i++){
			a[i]=sc.nextInt();
		}
		for(int i=n-1;i>0;i--){
			System.out.print(a[i]+" ");
		}
		System.out.println(a[0]);
	}

}

Compiler output:
Main.java:2: error: class No10011 is public, should be declared in a file named No10011.java
public class No10011 {
       ^
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();
		int[] a =new int[n];
		for(int i=0;i<n;i++){
			a[i]=sc.nextInt();
		}
		for(int i=n-1;i>0;i--){
			System.out.print(a[i]+" ");
		}
		System.out.println(a[0]);
	}

}

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

public class Main {

	public static void main(String[] args) {
		java.util.Scanner scan = new java.util.Scanner(System.in);
		int i;
		int a[] = new int[100];
		int n = scan.nextInt();
		for (i = 0 ; i < n ; i++ ) {
			a[i] = scan.nextInt();
		}
		for (i = n - 1 ; i >= 0 ; i--) {
			if(i != 0 ){
				System.out.print(a[i] + " ");
			} else {
				System.out.println(a[i]);
				break;
			}
		}

	}

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

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

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

public class Main {
	public static void main(String[] args){ 
		Scanner sc=new Scanner(System.in);
		int z = sc.nextInt();
		if(z > 100) System.out.printf("NG");
		int h[] =new int[z];
		for(int i=0;i<z;i++){
			h[i]=sc.nextInt();
		}
		for(int j=0;j<z;j++){
			if(j==0)System.out.print(""+h[z-1]);
			else System.out.printf(" %d",h[z-(j+1)]);
			
			if(j==(z-1))System.out.printf("\n");
		}
		sc.close();
		System.exit(0);
	}		
}

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

public static void main(String[] args){ 
		Scanner sc=new Scanner(System.in);
		int z = sc.nextInt();
		if(z > 100) System.out.printf("NG");
		int h[] =new int[z];
		for(int i=0;i<z;i++){
			h[i]=sc.nextInt();
		}
		for(int j=0;j<z;j++){
			if(j==0)System.out.print(""+h[z-1]);
			else System.out.printf(" %d",h[z-(j+1)]);
			
			if(j==(z-1))System.out.printf("\n");
		}
		sc.close();
		System.exit(0);
	}

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args){ 
              ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: Java

public class Main{
	public static void main(String[] args){ 
		Scanner sc=new Scanner(System.in);
		int z = sc.nextInt();
		int h[] =new int[z];
		for(int i=0;i<z;i++){
			h[i]=sc.nextInt();
		}
		for(int j=0;j<z;j++){
			if(j==0)System.out.print(""+h[z-1]);
			else System.out.printf(" %d",h[z-(j+1)]);
			
			if(j==(z-1))System.out.printf("\n");
		}
		sc.close();
		System.exit(0);
	}		
}

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

public class Main {
	public static void main(String[] args){ 
		Scanner sc=new Scanner(System.in);
		int z = sc.nextInt();
		int h[] =new int[z];
		for(int i=0;i<z;i++){
			h[i]=sc.nextInt();
		}
		for(int j=0;j<z;j++){
			if(j==0)System.out.print(""+h[z-1]);
			else System.out.printf(" %d",h[z-(j+1)]);
			
			if(j==(z-1))System.out.printf("\n");
		}
		sc.close();
		System.exit(0);
	}		
}

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

public class  Main {
	public static void main(String[] args){ 
		Scanner sc =new Scanner(System.in);
		int z = sc.nextInt();
		int h[] =new int[z];
		for(int i=0;i<z;i++){
			h[i]= sc.nextInt();
		}
		for(int j=0;j<z;j++){
			if(j==0)System.out.print(""+h[z-1]);
			else System.out.printf(" %d",h[z-(j+1)]);
			
			if(j==(z-1))System.out.printf("\n");
		}
		sc.close();
		System.exit(0);
	}		
}

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

public class Main{
	public static void main(String[] args){ 
		Scanner sc =new Scanner(System.in);
		int z = sc.nextInt();
		int h[] =new int[z];
		for(int i=0;i<z;i++){
			h[i]= sc.nextInt();
		}
		for(int j=0;j<z;j++){
			if(j==0)System.out.print(""+h[z-1]);
			else  System.out.printf(" %d",h[z-(j+1)]);
			
			if(j==(z-1))System.out.printf("\n");
		}
		sc.close();
		System.exit(0);
	}		
}

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

public class AOJ111 {
	public static void main(String[] args){ 
		Scanner sc = new Scanner(System.in);
		int z = sc.nextInt();
		int h[] =new int[z];
		if(z>100) {
			System.out.printf("NG\n");
			System.exit(0);
		}
		for(int i=0;i<z;i++){
			h[i]= sc.nextInt();
		}
		for(int j=0;j<z;j++){
			if(j==0)System.out.print(""+h[z-1]);
			else System.out.printf(" %d",h[z-(j+1)]);
			
			if(j==(z-1))System.out.printf("\n");
		}
		sc.close();
		System.exit(0);
	}		
}

Compiler output:
Main.java:1: error: class AOJ111 is public, should be declared in a file named AOJ111.java
public class AOJ111 {
       ^
Main.java:3: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class AOJ111
Main.java:3: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class AOJ111
3 errors
Language: Java

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

public class Main {
	public static void main(String args[] ) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line=br.readLine();
		line=br.readLine();
		String[] nums=line.split(" ");
		line="";
		for(int n=nums.length-1;n>=0;n--){
			line+=nums[n]+" ";
		}
		System.out.println(line.substring(0,line.Lenth-2);
	}
}

Compiler output:
Main.java:14: error: ')' or ',' expected
		System.out.println(line.substring(0,line.Lenth-2);
		                                                 ^
1 error