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

#include<iostream>
using namespace std;
int main(){
	int n;
	cin >> n;
	for (int i = 1; i <= n; i++){
		if (i % 3 == 0){
			cout << " " << i;
		}
		if (i % 10 == 3){
			if (i % 3 == 0 && i % 10 == 3)
			{
				cout << "";
			}
			else{
				cout << " " << i;
			}
		}
		if (i - (i % 10) == i - (i % 100) + 30) | i - (i % 100) == i - (i % 1000) + 300) | i - (i % 1000) == i - (i % 10000) + 30){
			if (i % 3 == 0 && (i - (i % 10) == i - (i % 100) + 30) | i - (i % 100) == i - (i % 1000) + 300) | i - (i % 1000) == i - (i % 10000) + 30))
			{
				cout << "";
			}
			else if ((i - (i % 10) == i - (i % 100) + 30) | i - (i % 100) == i - (i % 1000) + 300) | i - (i % 1000) == i - (i % 10000) + 30) && i % 10 == 30)
			{
				cout << "";
			}
			else{
				cout << " " << i;
			}
		}
	}
	cout << endl; return 0;
}








Compiler output:
a.cc: In function 'int main()':
a.cc:19:57: error: expected primary-expression before '|' token
   19 |                 if (i - (i % 10) == i - (i % 100) + 30) | i - (i % 100) == i - (i % 1000) + 300) | i - (i % 1000) == i - (i % 10000) + 30){
      |                                                         ^
Language: C++

#include<stdio.h>
int main() {
	int n,i;
	scanf("%d", &n);
	for (i = 1; i <= n; i++) {
		if (i % 10 == 3, || i % 3 == 0) {
			printf(" %d", i);
		}
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:34: error: expected primary-expression before '||' token
    6 |                 if (i % 10 == 3, || i % 3 == 0) {
      |                                  ^~
Language: C++

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<stack>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<functional>
#include<stdio.h>
using namespace std;
int main(){
    int n;
    cin >> n;
    for(int i =1; i<=n;i++){
        if (i % 3 == 0 or i % 10 == 3 ){
            cout << " " << i;
            continue
        }
        int x = i;
        while (x){
            if (x%10 == 3){
                cout << " " << i;
                break;
            }
            x = x/10;
        }
    }
    cout endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:21: error: expected ';' before '}' token
   27 |             continue
      |                     ^
      |                     ;
   28 |         }
      |         ~            
a.cc:38:9: error: expected ';' before 'endl'
   38 |     cout endl;
      |         ^~~~~
      |         ;
Language: C++

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<stack>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<functional>
#include<stdio.h>
using namespace std;
int main(){
    int n;
    cin >> n;
    for(int i =1; i<=n;i++){
        if (i % 3 == 0 or i % 10 == 3 ){
            cout << " " << i;
            continue
        }
        int x = i;
        while (x){
            if (x%10 == 3){
                cout << " " << i;
                break;
            }
            x = x/10;
        }
    }
    cout << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:21: error: expected ';' before '}' token
   27 |             continue
      |                     ^
      |                     ;
   28 |         }
      |         ~
Language: C++

#include <stdio.h> using namespace std; int main(){ int n,x; scanf("%d",&n); for(int i = 1; i<= n; i++) { if(i%3 == 0){ printf(" %d",i); }else{ x = i; do{ if(x%10 == 3){ printf(" %d",i); break; } x /=10; }while(x); } } printf("\n"); } 


Compiler output:
a.cc:1:20: warning: extra tokens at end of #include directive
    1 | #include <stdio.h> using namespace std; int main(){ int n,x; scanf("%d",&n); for(int i = 1; i<= n; i++) { if(i%3 == 0){ printf(" %d",i); }else{ x = i; do{ if(x%10 == 3){ printf(" %d",i); break; } x /=10; }while(x); } } printf("\n"); }
      |                    ^~~~~
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>
using namespace std;

int main(){
    int n;
    
    cin >> n;
    
    for(int i = 3; i <= n; i++){
        if(((i % 3) == 0) || (((x / 10) % 10) == 3)){
            cout << " " << i;
        }
    }
    
    cout << endl;
    
    return 0;
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:33: error: 'x' was not declared in this scope
   10 |         if(((i % 3) == 0) || (((x / 10) % 10) == 3)){
      |                                 ^
Language: C++

#include <stdio.h>
useing namespace std:

bool has3(int x){
  while(x){
    if(x % 10 == 3) return true;
    x /- 10;
  }
  return false;
}
void call (int n){
  for(int x = 1; x <= n; x++){
    if(x%3==0 || has3(x)){
      cout << " "<< x;
    }
  }
  cout << end1;
}
int main(){
  int n;
   cin >> n;
   call(n);
   return(n);
}


Compiler output:
a.cc:2:1: error: 'useing' does not name a type
    2 | useing namespace std:
      | ^~~~~~
a.cc: In function 'void call(int)':
a.cc:13:18: error: 'has3' was not declared in this scope
   13 |     if(x%3==0 || has3(x)){
      |                  ^~~~
a.cc:14:7: error: 'cout' was not declared in this scope
   14 |       cout << " "<< x;
      |       ^~~~
a.cc:17:3: error: 'cout' was not declared in this scope
   17 |   cout << end1;
      |   ^~~~
a.cc:17:11: error: 'end1' was not declared in this scope
   17 |   cout << end1;
      |           ^~~~
a.cc: In function 'int main()':
a.cc:21:4: error: 'cin' was not declared in this scope
   21 |    cin >> n;
      |    ^~~
Language: C++

#include <iostream>
useing namespace std:

bool has3(int x){
  while(x){
    if(x % 10 == 3) return true;
    x /- 10;
  }
  return false;
}
void call (int n){
  for(int x = 1; x <= n; x++){
    if(x%3==0 || has3(x)){
      cout << " "<< x;
    }
  }
  cout << end1;
}
int main(){
  int n;
   cin >> n;
   call(n);
   return(n);
}


Compiler output:
a.cc:2:1: error: 'useing' does not name a type
    2 | useing namespace std:
      | ^~~~~~
a.cc: In function 'void call(int)':
a.cc:13:18: error: 'has3' was not declared in this scope
   13 |     if(x%3==0 || has3(x)){
      |                  ^~~~
a.cc:14:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   14 |       cout << " "<< x;
      |       ^~~~
      |       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:17:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   17 |   cout << end1;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:17:11: error: 'end1' was not declared in this scope
   17 |   cout << end1;
      |           ^~~~
a.cc: In function 'int main()':
a.cc:21:4: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   21 |    cin >> n;
      |    ^~~
      |    std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
Language: C++

#include <iostream>
useing namespace std:

bool has3(int x){
  while(x){
    if(x % 10 == 3) return true;
    x /= 10;
  }
  return false;
}
void call (int n){
  for(int x = 1; x <= n; x++){
    if(x % 3==0 || has3(x)){
      cout << " "<< x;
    }
  }
  cout << endl;
}
int main(){
  int n;
   cin >> n;
   call(n);
   return(n);
}


Compiler output:
a.cc:2:1: error: 'useing' does not name a type
    2 | useing namespace std:
      | ^~~~~~
a.cc: In function 'void call(int)':
a.cc:13:20: error: 'has3' was not declared in this scope
   13 |     if(x % 3==0 || has3(x)){
      |                    ^~~~
a.cc:14:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   14 |       cout << " "<< x;
      |       ^~~~
      |       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:17:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   17 |   cout << endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:17:11: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   17 |   cout << endl;
      |           ^~~~
      |           std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc: In function 'int main()':
a.cc:21:4: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   21 |    cin >> n;
      |    ^~~
      |    std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
Language: C++

#include <iostream>
using namespace std:

bool has3(int x){
  while(x){
    if(x % 10 == 3) return true;
    x /= 10;
  }
  return false;
}
void call (int n){
  for(int x = 1; x <= n; x++){
    if(x % 3==0 || has3(x)){
      cout << " "<< x;
    }
  }
  cout << end1;
}
int main(){
  int n;
   cin >> n;
   call(n);
   return(n);
}


Compiler output:
a.cc:2:20: error: expected ';' before ':' token
    2 | using namespace std:
      |                    ^
      |                    ;
a.cc:2:20: error: expected unqualified-id before ':' token
a.cc: In function 'void call(int)':
a.cc:13:20: error: 'has3' was not declared in this scope
   13 |     if(x % 3==0 || has3(x)){
      |                    ^~~~
a.cc:17:11: error: 'end1' was not declared in this scope
   17 |   cout << end1;
      |           ^~~~
Language: C++

#include <iostream>
using namespace std:

bool has3(int x){
  while(x){
    if(x % 10 == 3) return true;
    x /= 10;
  }
  return false;
}
void call (int n){
  for(int x = 1; x <= n; x++){
    if(x % 3==0 || has3(x)){
      cout << " "<< x;
    }
  }
  cout << endl;
}
int main(){
  int n;
   cin >> n;
   call(n);
   return(n);
}


Compiler output:
a.cc:2:20: error: expected ';' before ':' token
    2 | using namespace std:
      |                    ^
      |                    ;
a.cc:2:20: error: expected unqualified-id before ':' token
a.cc: In function 'void call(int)':
a.cc:13:20: error: 'has3' was not declared in this scope
   13 |     if(x % 3==0 || has3(x)){
      |                    ^~~~
Language: C++

#include <iostream>
using namespace std:

bool has3(int x){
  while(x){
    if(x % 10 == 3) return true;
    x /= 10;
  }
  return false;
}
void call (int n){
  for(int x = 1; x <= n; x++){
    if(x % 3==0 || has3(x)){
      cout << " "<< x;
    }
  }
  cout << endl;
}
int main(){
  int n;
   cin >> n;
   call(n);
   return 0;
}


Compiler output:
a.cc:2:20: error: expected ';' before ':' token
    2 | using namespace std:
      |                    ^
      |                    ;
a.cc:2:20: error: expected unqualified-id before ':' token
a.cc: In function 'void call(int)':
a.cc:13:20: error: 'has3' was not declared in this scope
   13 |     if(x % 3==0 || has3(x)){
      |                    ^~~~
Language: C++

#include <iostream>
using namespace std:

bool has3(int x){
while(x){
if(x % 10 == 3) return true;
x /= 10;
}
return false;
}
void call (int n){
for(int x = 1; x <= n; x++){
if(x % 3==0 || has3(x) ){
cout <<" "<< x;
}
}
cout << endl;
}
int main(){
int n;
cin >> n;
call(n);
return 0;
}


Compiler output:
a.cc:2:20: error: expected ';' before ':' token
    2 | using namespace std:
      |                    ^
      |                    ;
a.cc:2:20: error: expected unqualified-id before ':' token
a.cc: In function 'void call(int)':
a.cc:13:16: error: 'has3' was not declared in this scope
   13 | if(x % 3==0 || has3(x) ){
      |                ^~~~
Language: C++

#include<stdio.h>
int main(){
int a;
scanf("%d",&a);
while(i=1;i<=a;i++){
if(i%10==3||i%3==0)
printf("%d ",i);
}
}



Compiler output:
a.cc: In function 'int main()':
a.cc:5:7: error: 'i' was not declared in this scope
    5 | while(i=1;i<=a;i++){
      |       ^
a.cc:5:10: error: expected ')' before ';' token
    5 | while(i=1;i<=a;i++){
      |      ~   ^
      |          )
a.cc:5:11: error: 'i' was not declared in this scope
    5 | while(i=1;i<=a;i++){
      |           ^
Language: C++

#include<stdio.h>
int main(){
int a,i;
scanf("%d",&a);
while(i=1;i<=a;i++){
if(i%10==3||i%3==0)
printf("%d ",i);
}
}



Compiler output:
a.cc: In function 'int main()':
a.cc:5:10: error: expected ')' before ';' token
    5 | while(i=1;i<=a;i++){
      |      ~   ^
      |          )
a.cc:5:19: error: expected ';' before ')' token
    5 | while(i=1;i<=a;i++){
      |                   ^
      |                   ;
Language: C++

#include<stdio.h>
int main(){
int a,i;
scanf("%d",&a);
while(i=1;i<=a;i++){
if(i%10==3||i%3==0){
printf("%d ",i);}
}
}



Compiler output:
a.cc: In function 'int main()':
a.cc:5:10: error: expected ')' before ';' token
    5 | while(i=1;i<=a;i++){
      |      ~   ^
      |          )
a.cc:5:19: error: expected ';' before ')' token
    5 | while(i=1;i<=a;i++){
      |                   ^
      |                   ;
Language: C++

#include<stdio.h>
int main(){
int a,i;
scanf("%d",&a);
while(i=1;i<=a;i++;){
if(i%10==3||i%3==0){
printf("%d ",i);
}
}
}



Compiler output:
a.cc: In function 'int main()':
a.cc:5:10: error: expected ')' before ';' token
    5 | while(i=1;i<=a;i++;){
      |      ~   ^
      |          )
a.cc:5:20: error: expected primary-expression before ')' token
    5 | while(i=1;i<=a;i++;){
      |                    ^
Language: C++

#include<stdio.h>
int main(){
int a,i;
scanf("%d",&a);
while(i=1;i<=a;i++){
if(i%10==3||i%3==0){
printf("%d ",i);
}
}
}



Compiler output:
a.cc: In function 'int main()':
a.cc:5:10: error: expected ')' before ';' token
    5 | while(i=1;i<=a;i++){
      |      ~   ^
      |          )
a.cc:5:19: error: expected ';' before ')' token
    5 | while(i=1;i<=a;i++){
      |                   ^
      |                   ;
Language: C++

#include<stdio.h>
int main(){
int a,b,i;
scanf("%d",&a);
for(i=0;i<=a;i++){
if(i%3==0){printf(" %d",i);}
else{
b=i;
while(b>0){
b/=10
if(b%10==3){
printf(" %d",i);
}
}

}

}
printf("\n");
}



Compiler output:
a.cc: In function 'int main()':
a.cc:10:6: error: expected ';' before 'if'
   10 | b/=10
      |      ^
      |      ;
   11 | if(b%10==3){
      | ~~
Language: C++

#include<iostream>
using namespace std;

int main(){
	int n;
	cin>>n;
	for(int i=1;i<=n;i++){
		if(if(i%10==3 || i%3==0 || (i/10)%10==3|| (i/100)%10==3 || (i/1000)%10==3))cout<<" "<<i;
	}
	cout<<endl;
	
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:20: error: expected primary-expression before 'if'
    8 |                 if(if(i%10==3 || i%3==0 || (i/10)%10==3|| (i/100)%10==3 || (i/1000)%10==3))cout<<" "<<i;
      |                    ^~
a.cc:8:20: error: expected ')' before 'if'
    8 |                 if(if(i%10==3 || i%3==0 || (i/10)%10==3|| (i/100)%10==3 || (i/1000)%10==3))cout<<" "<<i;
      |                   ~^~
      |                    )
Language: C++

#include <stdio.h>
#include <iostream>

using namespace std;
void call(int n){
	int i=1;
	do{
		int x=i;
		if(x%3==0){
			cout<<" "<<i;
		}else{
			do
			{
				if(x%10==3){
					cout<<" "<<i;	
					break;
				}
				x/=10;
			}while(x);
		}
	}while(++i<=n); 
	cout << endl;
 }



Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

using namespace std;


void call(int num){
    
    for(int i = 1; i <=num; i++){
        if(i%3==0){
            cout << " " << i;
        }
        if(i>10 && i%10==3){
            cout << " " << i;
        }
        
    }
    cout << endl;
    
}


Compiler output:
a.cc: In function 'void call(int)':
a.cc:8:13: error: 'cout' was not declared in this scope
    8 |             cout << " " << i;
      |             ^~~~
a.cc:1:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:11:13: error: 'cout' was not declared in this scope
   11 |             cout << " " << i;
      |             ^~~~
a.cc:11:13: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:15:5: error: 'cout' was not declared in this scope
   15 |     cout << endl;
      |     ^~~~
a.cc:15:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:15:13: error: 'endl' was not declared in this scope
   15 |     cout << endl;
      |             ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <cmath>
using namespace std;
int main(){
    int n;
    cin>>n;
     int i = 1;
 CHECK_NUM:
  int x = i;
  if ( x % 3 == 0 ){
    cout << " " << i;
    goto END_CHECK_NUM;
  }
 INCLUDE3:
  if ( x % 10 == 3 ){
    cout << " " << i;
    goto END_CHECK_NUM;
  }
  x /= 10;
  if ( x ) goto INCLUDE3;
 END_CHECK_NUM:
  if ( ++i <= n ) goto CHECK_NUM;

  cout << endl;
}
    return 0;
}


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

import java.util.Scanner;

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

            int   n = scan.nextInt();

            int[] a = new     int[n];

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

                 int a[i] =scan.nextInt();

              }

              for(int i =n-1;i>=0;i--){

              System.out.println(a[i]);

                 if(i!=0){
                    System.out.print(" ");
                 }
              }  
              System.out.println();            
        }
     }



Compiler output:
Main.java:13: error: ']' expected
                 int a[i] =scan.nextInt();
                       ^
Main.java:13: error: ';' expected
                 int a[i] =scan.nextInt();
                        ^
2 errors
Language: Java

import java.util.Scanner;

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

            int n = scan.nextInt();

            int[] a = new int[n];

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

                 a[i] =scan.nextInt();

              }

              for(int i =n-1;i>=0;i--){

              System.out.print(a[i]);

                 if(i!=0){
                    System.out.print(" ");
                 }
              }  
              eSystem.out.println();            
        }
     }



Compiler output:
Main.java:25: error: package eSystem does not exist
              eSystem.out.println();            
                     ^
1 error
Language: Java

import java.util.*;

public class prog {
    static Scanner scanner;
    public static void main(String[] args) {
        scanner = new Scanner(System.in);
        
        int[] arr = new int[scanner.nextInt()];
        
        for(int i = 0; i < arr.length; ++i) {
            arr[i] = scanner.nextInt();
        }
        
        for(int i = arr.length - 1; i >= 0; --i) {
            System.out.print(arr[i] + (i != 0 ? " " : ""));
        }
        System.out.println();
    }
}


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

import java.util.Scanner;



public class Main {

    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int an[] = new int[100];
        int n = input.nextInt();
        for(int i = 0; i < n; i++) {

            an[i] = input.nextInt();

        }

        for(int i = n - 1; i >= 0; i--){
            System.out.printf("%d ", an[i]);

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

}


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

import java.util.Scanner;

public class Reverse{
    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.printf("%d ",a[i]);
        }
        System.out.printf("\n");
        sc.close();

    }
}


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

import java.util.Scanner;

public class Reverse{
    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.printf("%d ",a[i]);
        }
        System.out.printf("%d\n",a[0]);
        sc.close();

    }
}


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

import java.util.ArrayList;
import java.util.Comparator;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        ArrayList<Integer> a = new ArrayList<Integer>();
        for (int i = 0; i < n; i++) {import java.util.ArrayList;
import java.util.Comparator;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        ArrayList<Integer> a = new ArrayList<Integer>();
        for (int i = 0; i < n; i++) {
            a.add(scanner.nextInt());
        }
        for (int i = a.size() - 1; i >= 0; i--) {
            System.out.print(a.get(i));
            if (i != 0) {
                System.out.print(" ");
            }
        }
        System.out.println("");
    }
}

            a.add(scanner.nextInt());
        }
        a.sort(Comparator.reverseOrder());
        for (int i = 0; i < a.size(); i++) {
            System.out.print(a.get(i));
            if (i != a.size() - 1) {
                System.out.print(" ");
            }
        }
        System.out.println("");
    }
}



Compiler output:
Main.java:10: error: illegal start of expression
        for (int i = 0; i < n; i++) {import java.util.ArrayList;
                                     ^
Main.java:10: error: not a statement
        for (int i = 0; i < n; i++) {import java.util.ArrayList;
                                                     ^
Main.java:11: error: illegal start of expression
import java.util.Comparator;
^
Main.java:11: error: not a statement
import java.util.Comparator;
                ^
Main.java:12: error: illegal start of expression
import java.util.Scanner;
^
Main.java:12: error: not a statement
import java.util.Scanner;
                ^
Main.java:14: error: illegal start of expression
public class Main {
^
Main.java:32: error: <identifier> expected
            a.add(scanner.nextInt());
                 ^
Main.java:32: error: <identifier> expected
            a.add(scanner.nextInt());
                                 ^
Main.java:34: error: class, interface, enum, or record expected
        a.sort(Comparator.reverseOrder());
        ^
Main.java:35: error: class, interface, enum, or record expected
        for (int i = 0; i < a.size(); i++) {
        ^
Main.java:35: error: class, interface, enum, or record expected
        for (int i = 0; i < a.size(); i++) {
                        ^
Main.java:35: error: class, interface, enum, or record expected
        for (int i = 0; i < a.size(); i++) {
                                      ^
Main.java:37: error: class, interface, enum, or record expected
            if (i != a.size() - 1) {
            ^
Main.java:39: error: class, interface, enum, or record expected
            }
            ^
Main.java:42: error: class, interface, enum, or record expected
    }
    ^
16 errors
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<a.length;i++){
      a[i]=sc.nextInt();
    }
    for(int j=0;j<a.length;j++){
      System.out.printf("%d",a[n-1-j]);
      if(j-1<a.length){
          System.out.print(" ");
      }
    }
    System.out.println("");
    sc.close();
  }


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

import java.util.Scanner;
public class Main2 {
    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 < a.length; i++) {
            a[i] = sc.nextInt();
        }
        for (int i = a.length-1; i >= 0; i--) {
            System.out.print(a[i]+" ");
        }
        System.out.println();
    }
}


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

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[100000];
    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]);
}
}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[100000];
    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:12: error: class, interface, enum, or record expected
}import java.util.*;
 ^
1 error
Language: Java

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





Compiler output:
Main.java:9: error: ';' expected
  for(int i=0, i<n; i++)
                ^
Main.java:9: error: > or ',' expected
  for(int i=0, i<n; i++)
                  ^
Main.java:10: error: variable declaration not allowed here
   int a[] = sc.nextInt();
       ^
Main.java:12: error: reached end of file while parsing
   System.out.print(a[n]);
                          ^
4 errors
Language: Java

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





Compiler output:
Main.java:10: error: variable declaration not allowed here
   int a[] = sc.nextInt();
       ^
Main.java:12: error: reached end of file while parsing
   System.out.print(a[n]);
                          ^
2 errors
Language: Java

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





Compiler output:
Main.java:10: error: ']' expected
   int a[i] = sc.nextInt();
         ^
Main.java:10: error: variable declaration not allowed here
   int a[i] = sc.nextInt();
       ^
Main.java:10: error: ';' expected
   int a[i] = sc.nextInt();
          ^
Main.java:12: error: reached end of file while parsing
   System.out.print();
                      ^
4 errors
Language: Java

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





Compiler output:
Main.java:8: error: ';' expected
  int a[] = new int[n]
                      ^
Main.java:13: error: reached end of file while parsing
   System.out.print();
                      ^
2 errors
Language: Java

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





Compiler output:
Main.java:13: error: reached end of file while parsing
   System.out.print();
                      ^
1 error
Language: Java

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






Compiler output:
Main.java:16: 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 = sc.nextlnt();
  int a[] = new int[n];
  
  for(int i=0; i<n; i++)
   a[i] = sc.nextInt();






Compiler output:
Main.java:11: error: reached end of file while parsing
   a[i] = sc.nextInt();
                       ^
1 error
Language: Java

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





Compiler output:
Main.java:14: 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 = sc.nextlnt();
  int a[] = new int[n];
  
  for(int i=0; i<n; i++){
   a[i] = sc.nextInt();
   System.out.print(n +" ");
   n--;
   }
 }
}




Compiler output:
Main.java:7: error: cannot find symbol
  int n = sc.nextlnt();
            ^
  symbol:   method nextlnt()
  location: variable sc of type Scanner
1 error
Language: Java

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




Compiler output:
Main.java:7: error: cannot find symbol
  int  n  = sc.nextlnt();
              ^
  symbol:   method nextlnt()
  location: variable sc of type Scanner
1 error
Language: Java

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




Compiler output:
Main.java:7: error: cannot find symbol
  int  n  = sc.nextlnt();
              ^
  symbol:   method nextlnt()
  location: variable sc of type Scanner
1 error
Language: Java

import java.util.Scanner;
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(i=0;i<n-1;i++){
  System.out.print(a[n-1]+" ");
  n--;
  }
  System.out.println(a[0]);
}
}




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

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

		int x = scan.nextInt();

		int[] array = new int[x];

		if (x == 1) {
			array[0] = scan.nextInt();
			System.out.println(array[0]);
		}

		else {
			for (int i = 0; i < x; i++) {
				array[i] = scan.nextInt();
			}

			System.out.print(array[x - 1] + " ");
			for (int i = x - 2; i > 0; i--) {
				System.out.print(array[i] + " ");
			}
			System.out.println(array[0]);
		}
	}
}

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

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

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

		try {
			InputStreamReader isr = new InputStreamReader(System.in);
			BufferedReader br = new BufferedReader(isr);
			String buf = br.readLine();
			int n = Integer.parseInt(buf);
			buf = br.readLine();
			StringTokenizer st = new StringTokenizer(buf, " ");
			int[] a = new int[n];

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

				a[i]=Integer.parseInt(st.nextToken());
			}

			for(int i=n-1;i>=0;i--)
				System.out.print(a[i]+" ");

		} catch (IOException e) {
			System.err.println(e);
		}
	}

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

import java.io.*;
public class A {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		String str = br.readLine();
        String[] strs = str.split(" ");
		//--- list内表示 ---
		for(int i = strs.length-1; i >= 0; i--){
			if(1 != 0){
				System.out.print(strs[i] + " ");
			}else{
				System.out.print(strs[i]);
			}//if
		}//for
	}
}

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

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


/**
 * Lesson6A　与えられた数列を逆順に出力するプログラム
 *
 * @author 前島佑介
 * @version 2014/12/1
 */
public class Lesson6A {

	/**
	 * プログラムのエントリポイント
	 *
	 * @param args
	 */
	public static void main(String[] args) {

		// 1行目読み込む
		try {

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

			insBR.readLine();

			//2行目読み込む
			String strLine = insBR.readLine();

			//反転させる
			StringBuffer sb = new StringBuffer(strLine);
			strLine = sb.reverse().toString();

			//出力
			System.out.print(strLine);

		} catch (IOException e) {
			System.out.println(e);
		} catch (NumberFormatException e) {
			System.out.println("数値で入力して下さい");
		}
	}
}

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

class Main {

	/**
	 * プログラムのエントリポイント
	 * @param args
	 */
	public static void main(String[] args) {

		// 1行目読み込む
		try{
			BufferedReader insBR = new BufferedReader(new InputStreamReader(System.in));
			insBR.readLine();

			//2行目読み込む
			String strLine = insBR.readLine();

			//降順にする
			StringBuffer sb = new StringBuffer(strLine);
			strLine = sb.reverse().toString();
			// 出力
			System.out.println(strLine + "1");
		} catch (IOException e) {
			System.out.println(e);
		} catch (NumberFormatException e) {
			System.out.println("数字で入力して下さい");
		}
	}
}

Compiler output:
Main.java:11: error: cannot find symbol
			BufferedReader insBR = new BufferedReader(new InputStreamReader(System.in));
			^
  symbol:   class BufferedReader
  location: class Main
Main.java:11: error: cannot find symbol
			BufferedReader insBR = new BufferedReader(new InputStreamReader(System.in));
			                           ^
  symbol:   class BufferedReader
  location: class Main
Main.java:11: error: cannot find symbol
			BufferedReader insBR = new BufferedReader(new InputStreamReader(System.in));
			                                              ^
  symbol:   class InputStreamReader
  location: class Main
Main.java:22: error: cannot find symbol
		} catch (IOException e) {
		         ^
  symbol:   class IOException
  location: class Main
4 errors
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(),x;
		int[] a=new int[n];
		for(x=0;x<n;x++){
		a[x] = sc.nextInt();
		}
		for(x=n-1;x>=0;x--){
		System.out.print(a[x]);
		if(x!=0){System.out.print(" ");}
		}
	}
}

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

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line = br.readLine();
        String line2 = br.readLine();
        String[] ary = line2.split(" ");
        List<Integer> list = new ArrayList<Integer>();
        for(int i=0;i<ary.length;i++) {
          list.add(new Integer(ary[i]));
        }
        Collections.reverse(list);
        for(int i=0;i<list.size();i++) {
           System.out.println(list.get(i));
           if(list.size()-1) {
             System.out.println();
           }else {
             System.out.print(" ");
           }
        }
    }
}

Compiler output:
Main.java:13: warning: [removal] Integer(String) in Integer has been deprecated and marked for removal
          list.add(new Integer(ary[i]));
                   ^
Main.java:18: error: incompatible types: int cannot be converted to boolean
           if(list.size()-1) {
                         ^
1 error
1 warning
Language: Java

import java.util. *;

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

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

import java.util. *;

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

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

#include<iostream>
using namespace std;
 
 
int main()
{
    int n, count = 0;
    int a[101];
    cin >> n;
    for (int i = 0; i < n; i++){
        cin >> a[i];
        count++;
    }
    for (int i = 0; i < n; i++){
        cout << a[count - i - 1];
        if (i == n - 1){
            cout << endl;
        }
        else{
            cout << " ";
        }
    }
    return 0;
}

Compiler output:
Main.java:1: error: illegal character: '#'
#include<iostream>
^
Main.java:1: error: class, interface, enum, or record expected
#include<iostream>
        ^
Main.java:9: error: not a statement
    cin >> n;
        ^
Main.java:11: error: not a statement
        cin >> a[i];
            ^
Main.java:15: error: not a statement
        cout << a[count - i - 1];
             ^
Main.java:17: error: not a statement
            cout << endl;
                 ^
Main.java:20: error: not a statement
            cout << " ";
                 ^
Main.java:5: error: unnamed classes are a preview feature and are disabled by default.
int main()
^
  (use --enable-preview to enable unnamed classes)
Main.java:8: error: ']' expected
    int a[101];
          ^
9 errors
Language: Java

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

Compiler output:
Main.java:7: error: array required, but int found
		for(int i=n;i>0;i--)n[i]=sc.nextInt();
		                     ^
1 error
Language: Java

import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner scan=new Scanner(System.in);
int a=scan.nextInt();
int[] c=int[101];
for(int b=0;b<a;b++){
c[b]=scan.nextInt();
}
for(int e=a-1;e>=0;e++){
Sysytem.out.println(c[e]);
}
}
}

Compiler output:
Main.java:6: error: ']' expected
int[] c=int[101];
            ^
1 error
Language: Java

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

class Main {
	@SuppressWarnings("resource")
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		//?????????
        StringBuilder sb=new StringBuilder("");
		int n = scan.nextInt();
		Integer[] hako = new Integer[n];
		
		//??????
		
		for(int i = 0; i < hako.length ; i++){
			int a = scan.nextInt();
			hako[i] = a; 
		}//for
		
		//??????????????????
		Arrays.sort(hako, Collections.reverseOrder());
		
		//??\?????????
		for(int i = 0; i < hako.length; i++){
			sb.append(hako[i]);
			if(i < hako.length-1){
				sb.append(" ");
			}
		}//for
		
		//??????
		System.out.println(sb);
	}

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

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


public class Main2 {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = br.readLine();
		String line2 = br.readLine();
		String[] ary = line2.split(" ");
		List<Integer> list = new ArrayList<Integer>();
		for (int i = 0; i < ary.length; i++) {
			list.add(new Integer(ary[i]));
		}
		Collections.reverse(list);
		for (int i = 0; i < list.size(); i++) {
			System.out.print(list.get(i));
			if (i == list.size() - 1) {
				System.out.println();
			} else {
				System.out.print(" ");
			}
		}
	}
}

Compiler output:
Main.java:7: error: class Main2 is public, should be declared in a file named Main2.java
public class Main2 {
       ^
Main.java:15: warning: [removal] Integer(String) in Integer has been deprecated and marked for removal
			list.add(new Integer(ary[i]));
			         ^
1 error
1 warning
Language: Java

import java.util.Scanner;

public class MAin {


    public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();//n?????°????????????
		int vals[] = new int[n], work;
		for(int cnt = 0; cnt < n; cnt++){//??°????????\?????????
			vals[cnt] = scan.nextInt();
		}
    	for(int cnt1 = 0; cnt1 < n; cnt1++)//??°??????????????????????????????
        	for(int cnt2 = cnt1 + 1; cnt2 < n; cnt2++)
        {
    			if(vals[cnt1] < vals[cnt2])
    	        {
    	            work = vals[cnt1];
    	            vals[cnt1] = vals[cnt2];
    	            vals[cnt2] = work;
    	        }
        }
		for(int cnt = 0; cnt < n; cnt++){//??°??????????????????
			System.out.print(vals[cnt]);
			if(cnt != n - 1){//?????????????????§?????????
				System.out.print(" ");
			}
		}
        scan.close();
    }

}

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

import java.io.*;

class Main {
    public static void main(String args[]) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder builder = new StringBuilder();

        int n = Integer.parseInt();
        String[] str = reader.readLine().split(" ");

        for (int i =n - 1; i < 0; i--) {
            builder.append(str[i] + " ");
        }
    }
}

Compiler output:
Main.java:8: error: no suitable method found for parseInt(no arguments)
        int n = Integer.parseInt();
                       ^
    method Integer.parseInt(String,int) is not applicable
      (actual and formal argument lists differ in length)
    method Integer.parseInt(CharSequence,int,int,int) is not applicable
      (actual and formal argument lists differ in length)
    method Integer.parseInt(String) is not applicable
      (actual and formal argument lists differ in length)
1 error
Language: Java

import java.io.*;

class Main {
    public static void main(String args[]) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder builder = new StringBuilder();

        int n = Integer.parseInt(reader.readLine);
        String[] str = reader.readLine().split(" ");

        for (int i =n - 1; i < 0; i--) {
            builder.append(str[i] + " ");
        }
    }
}

Compiler output:
Main.java:8: error: cannot find symbol
        int n = Integer.parseInt(reader.readLine);
                                       ^
  symbol:   variable readLine
  location: variable reader of type BufferedReader
1 error
Language: Java

package package6;

import java.util.Scanner;

public class B {

	public static void main(String[] args) {

			int[] A=new int[100];

			Scanner scan = new Scanner(System.in);
			int n = scan.nextInt();

			for(int i = 1;i <= n;i++){
				A[i] = scan.nextInt();
			}
			for(int i = n-1;i >= 0;i--){
				if(i != n){
					System.out.print(" ");
				}
				System.out.print(A[i]);
			}
			System.out.println();
		}
	}

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

public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int[] intArray = new int[a];
        for (int i = 0; i < a; i++) {
            int b = scanner.nextInt();
            intArray[i] = b;
        }
        for (int kuri = 0; kuri < a - 1; kuri++) {
            for (int i = 0; i < a - 1; i++) {
                if (intArray[i] < intArray[i + 1]) { 
                    int c;
                    c = intArray[i];
                    intArray[i] = intArray[i + 1];
                    intArray[i + 1] = c;
                }
            }
        }
        for (int k = 0; k < a - 1; k++) {
            System.out.print(intArray[k] + " ");
        }
        System.out.print(intArray[a - 1]);
    }
}

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