criyle/codenet-compile-errors huggingface dataset:
Language: Java

import java.util.*;

public class Main{
	public static void main(String[] args) throws Exception{
		Scanner sc = new Scanner(System.in)
                String str=sc.nextLine();
                String str=sc.nextLine();
		String[] s=str.split(" ");
		for(int i=(s.length-1);i>=0;i--){
			System.out.print(s[i]);
		}
	}
}

Compiler output:
Main.java:5: error: ';' expected
		Scanner sc = new Scanner(System.in)
		                                   ^
1 error
Language: Java

import java.util.*;

public class Main{
	public static void main(String[] args) throws Exception{
		Scanner sc = new Scanner(System.in);
                String str=sc.nextLine();
                String str=sc.nextLine();
		String[] s=str.split(" ");
		for(int i=(s.length-1);i>=0;i--){
			System.out.print(s[i]);
		}
	}
}

Compiler output:
Main.java:7: error: variable str is already defined in method main(String[])
                String str=sc.nextLine();
                       ^
1 error
Language: Java

import java.util.Scanner;
import java.lang.StringBuilder;
public class Main {
	public static void main(String[] args) throws Exception{
		Scanner sc = new Scanner(System.in);
		String str=sc.nextLine();
		String str=sc.nextLine();
		String[] s=str.split(" ");
		for(int i=(s.length-1);i>=0;i--){
			System.out.print(s[i]);
		}
	}
}

Compiler output:
Main.java:7: error: variable str is already defined in method main(String[])
		String str=sc.nextLine();
		       ^
1 error
Language: Java

import java.io.*;
class Main{
public static void main(String[] args)throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in);
String str=br.readLine();
int n=Integer.parseInt(n);
String str2=br.read();
String[] arr=str2.split(" ");
String[] rev =new String[n];
for(int i=0; i<n; i++){
rev[i]=arr[n-i-1];
System.out.print(rev[i]);
if(i !=n-1)  System.out.print(" ");
}
br.class();
}
} 

Compiler output:
Main.java:4: error: ')' or ',' expected
BufferedReader br=new BufferedReader(new InputStreamReader(System.in);
                                                                     ^
Main.java:15: error: not a statement
br.class();
  ^
Main.java:15: error: ';' expected
br.class();
        ^
3 errors
Language: Java

import java.io.*;
class Main{
public static void main(String[] args)throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in);
String str=br.readLine();
int n=Integer.parseInt(n);
String str2=br.read();
String[] arr=str2.split(" ");
String[] rev =new String[n];
for(int i=0; i<n; i++){
rev[i]=arr[n-i-1];
System.out.print(rev[i]);
if(i !=n-1)  System.out.print(" ");
}
br.close();
}
} 

Compiler output:
Main.java:4: error: ')' or ',' expected
BufferedReader br=new BufferedReader(new InputStreamReader(System.in);
                                                                     ^
1 error
Language: Java

import java.io.*;
class Main{
public static void main(String[] args)throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String str=br.readLine();
int n=Integer.parseInt(n);
String str2=br.read();
String[] arr=str2.split(" ");
String[] rev =new String[n];
for(int i=0; i<n; i++){
rev[i]=arr[n-i-1];
System.out.print(rev[i]);
if(i !=n-1)  System.out.print(" ");
}
br.close();
}
} 

Compiler output:
Main.java:6: error: incompatible types: int cannot be converted to String
int n=Integer.parseInt(n);
                       ^
Main.java:7: error: incompatible types: int cannot be converted to String
String str2=br.read();
                   ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
2 errors
Language: Java

class Main{
 
    public static void main(String[] args) throws IOException{
 
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int len = Integer.parseInt(br.readLine());
        int[] array = new int[len];
        String str = br.readLine();
        StringTokenizer st = new StringTokenizer(str, " ");
 
        for(int i = 0; i < len; i++){
            array[i] = Integer.parseInt(st.nextToken());
        }
 
        for(int i = len - 1; i >= 0; i--){
            System.out.print(array[i]);
            if(i != 0){
                System.out.print(" ");
            }else{
                System.out.print("\n");
            }
        }
 
    }
}

Compiler output:
Main.java:3: error: cannot find symbol
    public static void main(String[] args) throws IOException{
                                                  ^
  symbol:   class IOException
  location: class Main
Main.java:5: error: cannot find symbol
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        ^
  symbol:   class BufferedReader
  location: class Main
Main.java:5: error: cannot find symbol
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
                                ^
  symbol:   class BufferedReader
  location: class Main
Main.java:5: error: cannot find symbol
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
                                                   ^
  symbol:   class InputStreamReader
  location: class Main
Main.java:9: error: cannot find symbol
        StringTokenizer st = new StringTokenizer(str, " ");
        ^
  symbol:   class StringTokenizer
  location: class Main
Main.java:9: error: cannot find symbol
        StringTokenizer st = new StringTokenizer(str, " ");
                                 ^
  symbol:   class StringTokenizer
  location: class Main
6 errors
Language: Java

class Main {

import java.util.Scanner;
import java.util.StringJoiner;

  public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);

    int n = sc.nextInt();
    String[] ary = new String[n];

    for (int i = 0; i < n; i++ ) {
      ary[i] = String.valueOf(sc.nextInt());
    }

    sc.close();

    StringJoiner sj = new StringJoiner(" ");

    for(int i = 0; i<n; i++) {
      sj.add(ary[n-1-i]);
    }

    System.out.println(sj.toString());

  }
}

Compiler output:
Main.java:3: error: illegal start of type
import java.util.Scanner;
^
Main.java:3: error: <identifier> expected
import java.util.Scanner;
                        ^
Main.java:4: error: illegal start of type
import java.util.StringJoiner;
^
Main.java:4: error: <identifier> expected
import java.util.StringJoiner;
                             ^
4 errors
Language: Java



import java.util.Scanner;

public class Main{
	 
	    public static void main(String[] args) {
	        Scanner stdin  = new Scanner(System.in);
	        
	        int num = Integer.parseInt(stdin.nextLine());
	        
	        boolean boo = true;
	        int[] seq = new int[num];
	        if(num <= 100) {
	         
	        	for(int i = 0;i < num;i++) {
	        		seq[i] = stdin.nextInt();
	        		if(seq[i] >= 0 && seq[i] <= 1000) {
	        			continue;
	        		}else {
	        			boo = false;
	                break;
	        		}
	        	}
	        }
	         
	        if(boo == true) {
	            for(int j = num ;j > 0;j--) {
	                if(j != 1) {
	                    System.out.print(seq[j - 1]+" ");
	                }else {
	                    System.out.println(seq[j - 1]);
	                }
	            }
	        }
	         
	    }
	 
	}

}

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

import java.util.Scanner;

public class Main{
	 
	    public static void main(String[] args) {
	        Scanner stdin  = new Scanner(System.in);
	        
	        int num = Integer.parseInt(stdin.nextLine());
	        
	        boolean boo = true;
	        int[] seq = new int[num];
	        if(num <= 100) {
	         
	        	for(int i = 0;i < num;i++) {
	        		seq[i] = stdin.nextInt();
	        		if(seq[i] >= 0 && seq[i] <= 1000) {
	        			continue;
	        		}else {
	        			boo = false;
	                break;
	        		}
	        	}
	        }
	         
	        if(boo == true) {
	            for(int j = num ;j > 0;j--) {
	                if(j != 1) {
	                    System.out.print(seq[j - 1]+" ");
	                }else {
	                    System.out.println(seq[j - 1]);
	                }
	            }
	        }
	         
	    }
	 
	}

}

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

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

public class reversing {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int num = scanner.nextInt();
		if (num <= 100) {
			int array[] = new int[num];
			List<Integer> list = new ArrayList<Integer>();
			for (int i = 0; i < array.length; i++) {
				int next = scanner.nextInt();
				list.add(next);
			}
			if (0 <= list.size() && list.size() < 1000) {
				Collections.reverse(list);
				System.out.print(list);
			}
		}
	}
}

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

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

public class Main{
    public static void main(String[] args)throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str = br.readLine();
        
        int n = Integer.parseInt(str);
        
        str = br.readLine();
        String[] temp = str.split("\\s");
        int[] Suretu = new int[n];
        
        for(int i=0;i<n;i++){
            Suretu[i]=Integer.parseInt(temp[i]);
        }
       
        for(int i= n-1;i=0;i--){
            System.out.println(Suretu[i]);
        }

    }

    
}

Compiler output:
Main.java:19: error: incompatible types: int cannot be converted to boolean
        for(int i= n-1;i=0;i--){
                        ^
1 error
Language: Java

public class Main{
    public static void main(String[] args)throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
         String str = br.readLine();
                    
                    int n = Integer.parseInt(str);
                    
                    str = br.readLine();
                    String[] temp = str.split("\\s");
                    int[] Suretu = new int[n];
                    
                    for(int i=0;i<n;i++){
                        Suretu[i]=Integer.parseInt(temp[i]);
                    }
                    
                    Arrays.sort(Suretu);
                   
                    for(int i= n-1;i>=0;i--){
                        System.out.println(Suretu[i]);
                    }
    
}

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

import java.io.*;

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

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

    for (int i = n - 1; i >= 0; i--){
      if (i > 0)
        sb.append(str[i] + " ");
      wlse if (i == 0)
        sb.append(str[i]);  
    }
    System.out.println(sb);
  }
}

Compiler output:
Main.java:14: error: not a statement
      wlse if (i == 0)
      ^
Main.java:14: error: ';' expected
      wlse if (i == 0)
          ^
2 errors
Language: Java

import java.io.*;

public class Main
{
	public static main(String[] args)throws IOException
	{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));	
		int num  = Integer.parseInt(br.readLine());
		String[] arr = br.readLine().split(" ");
		for(int i = num-1; i>=0; i--)
		{
			System.out.print(arr[i]);
			if(i=0)	break;
			System.out.print(" ");	
		}
		System.out.println("");
	}
}

Compiler output:
Main.java:5: error: invalid method declaration; return type required
	public static main(String[] args)throws IOException
	              ^
1 error
Language: Java

import java.io.*;

public class Main
{
	public static void main(String[] args)throws IOException
	{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));	
		int num  = Integer.parseInt(br.readLine());
		String[] arr = br.readLine().split(" ");
		for(int i = num-1; i>=0; i--)
		{
			System.out.print(arr[i]);
			if(i=0)	break;
			System.out.print(" ");	
		}
		System.out.println("");
	}
}

Compiler output:
Main.java:13: error: incompatible types: int cannot be converted to boolean
			if(i=0)	break;
			    ^
1 error
Language: Java

import java.util.*;

class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.nextLine());
		String[] input = sc.nextLine().split(" ");
		int[] num = new int[input.length];
		for(int i=0;i<n;i++){
			int[i]=Integer.parseInt(input[input.length-i-1]);
		}
		for(int i=0;i<input.length;i++){
			SYstem.out.print(int[i]+" ");
		}
	}
}

Compiler output:
Main.java:10: error: ']' expected
			int[i]=Integer.parseInt(input[input.length-i-1]);
			    ^
Main.java:10: error: ';' expected
			int[i]=Integer.parseInt(input[input.length-i-1]);
			     ^
Main.java:13: error: ']' expected
			SYstem.out.print(int[i]+" ");
			                     ^
Main.java:13: error: ';' expected
			SYstem.out.print(int[i]+" ");
			                      ^
4 errors
Language: Java

import java.util.*;

class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.nextLine());
		String[] input = sc.nextLine().split(" ");
		int[] num = new int[input.length];
		for(int i=0;i<n;i++){
			num[i]=Integer.parseInt(input[input.length-i-1]);
		}
		for(int i=0;i<input.length;i++){
			SYstem.out.print(int[i]+" ");
		}
	}
}

Compiler output:
Main.java:13: error: ']' expected
			SYstem.out.print(int[i]+" ");
			                     ^
Main.java:13: error: ';' expected
			SYstem.out.print(int[i]+" ");
			                      ^
2 errors
Language: Java

import java.util.*;

class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.nextLine());
		String[] input = sc.nextLine().split(" ");
		int[] num = new int[input.length];
		for(int i=0;i<n;i++){
			num[i]=Integer.parseInt(input[input.length-i-1]);
		}
		for(int i=0;i<input.length;i++){
			System.out.print(int[i]+" ");
		}
	}
}

Compiler output:
Main.java:13: error: ']' expected
			System.out.print(int[i]+" ");
			                     ^
Main.java:13: error: ';' expected
			System.out.print(int[i]+" ");
			                      ^
2 errors
Language: Java

import java.util.*; 

public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner cin=new Scanner(System.in);
		
		int n = cin.nextInt();
		ArrayLisy<Integer> arr=new ArrayList<>();
		
		for(int i=0;i<n;i++){
			arr.add=cin.nextInt();
		}
		
		Collections.reverse(arr);
		
		for(int i=0;i<n;i++){
			System.out.print(arr[i]);
		}
		System.out.println();
	}

}



Compiler output:
Main.java:13: error: cannot find symbol
		ArrayLisy<Integer> arr=new ArrayList<>();
		^
  symbol:   class ArrayLisy
  location: class Main
1 error
Language: Java

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		Integer nums[] = new Integer[n];
		for(int i=0; i<n; i++) {
			nums[i] = sc.nextInt();
		}

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

		System.out.println("");

		sc.close();
	}



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

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
 
public class Main {
 
    public static final int BIG_NUM  = 2000000000;
    public static final int MOD  = 1000000007;
 
    public static void main(String[] args) {
 
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
 
        try {
            int N = Integer.parseInt(br.readLine());
 
            String array[] = br.readLine().split("\\s+");
 
            System.out.printf("%d",Integer.parseInt(array[array.length-1]));
            for(int i = array.length-2; i >= 0; i--){
                System.out.printf(" %d", Integer.parseInt(array[i]));
            }
            System.out.printf("\n");
 
 
        } catch (NumberFormatException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}

Compile Error Logs:

ステータス
Judge: 4/4	JAVA	CPU: 00:06 sec	Memory: 24840 KB	Length: 760 B	2018-01-20 23:26
テストケースの判定結果
Case #	Verdict	CPU Time	Memory	In	Out	Case Name
Case #1	: Accepted	00:04	24520	40	37	testcase_00
Case #2	: Accepted	00:04	24724	197	194	testcase_01
Case #3	: Accepted	00:04	24432	6	4	testcase_02
Case #4	: Accepted	00:06	24840	394	390	testcase_03

< prev |		/		| next >	 		
 
Judge Input #  ( | )		Judge Output #  ( | )



Compiler output:
Main.java:34: error: class, interface, enum, or record expected
Compile Error Logs:
^
Main.java:39: error: illegal character: '#'
Case #	Verdict	CPU Time	Memory	In	Out	Case Name
     ^
Main.java:40: error: illegal character: '#'
Case #1	: Accepted	00:04	24520	40	37	testcase_00
     ^
Main.java:41: error: illegal character: '#'
Case #2	: Accepted	00:04	24724	197	194	testcase_01
     ^
Main.java:42: error: illegal character: '#'
Case #3	: Accepted	00:04	24432	6	4	testcase_02
     ^
Main.java:43: error: illegal character: '#'
Case #4	: Accepted	00:06	24840	394	390	testcase_03
     ^
Main.java:47: error: illegal character: '#'
Judge Input #  ( | )		Judge Output #  ( | )
            ^
Main.java:47: error: illegal character: '#'
Judge Input #  ( | )		Judge Output #  ( | )
                    		             ^
8 errors
Language: Java

import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner scan=new Scanner(System.in);
		int a[]=new int[100];
		int n=scan.nextInt();
		
		for(int i=0;i<n;i++)
			a[i]=scan.nextInt();
		
			
		for(i=0;i<n/2;i++){
			int temp=a[i];
			a[i]=a[n-1-i];
			a[n-1-i]=temp;
		}
		
		for(i=0;i<n-1;i++)System.out.printf("%d ",a[i]);
		System.out.printf("%d\n",a[n-1]);
	}
}


Compiler output:
Main.java:13: error: cannot find symbol
		for(i=0;i<n/2;i++){
		    ^
  symbol:   variable i
  location: class Main
Main.java:13: error: cannot find symbol
		for(i=0;i<n/2;i++){
		        ^
  symbol:   variable i
  location: class Main
Main.java:13: error: cannot find symbol
		for(i=0;i<n/2;i++){
		              ^
  symbol:   variable i
  location: class Main
Main.java:14: error: cannot find symbol
			int temp=a[i];
			           ^
  symbol:   variable i
  location: class Main
Main.java:15: error: cannot find symbol
			a[i]=a[n-1-i];
			  ^
  symbol:   variable i
  location: class Main
Main.java:15: error: cannot find symbol
			a[i]=a[n-1-i];
			           ^
  symbol:   variable i
  location: class Main
Main.java:16: error: cannot find symbol
			a[n-1-i]=temp;
			      ^
  symbol:   variable i
  location: class Main
Main.java:19: error: cannot find symbol
		for(i=0;i<n-1;i++)System.out.printf("%d ",a[i]);
		    ^
  symbol:   variable i
  location: class Main
Main.java:19: error: cannot find symbol
		for(i=0;i<n-1;i++)System.out.printf("%d ",a[i]);
		        ^
  symbol:   variable i
  location: class Main
Main.java:19: error: cannot find symbol
		for(i=0;i<n-1;i++)System.out.printf("%d ",a[i]);
		              ^
  symbol:   variable i
  location: class Main
Main.java:19: error: cannot find symbol
		for(i=0;i<n-1;i++)System.out.printf("%d ",a[i]);
		                                            ^
  symbol:   variable i
  location: class Main
11 errors
Language: Java

import java.util.Scanner();

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


Compiler output:
Main.java:1: error: ';' expected
import java.util.Scanner();
                        ^
1 error
Language: Java

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


Compiler output:
Main.java:1: error: ';' expected
import java.util.Scanner
                        ^
1 error
Language: Java

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


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

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

        for(int i=0;i<n;i++){
            ans[i]=sc.nextInt();
        }
        
        System.out.print(ans[(n-1)]);
        for(int i =0;i<n;i++){
            System.out.print(" "+ans[(n-2-i)]);
            
        }
      
}


Compiler output:
Main.java:18: 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 ans[] = new int[1000];
        int n = sc.nextInt();

        for(int i=0;i<n;i++){
            ans[i]=sc.nextInt();
        }
        
        for(int i =0;i<n;i++){
            System.out.print(ans[(n-1-i)]);
            if(i!=n-1)System.out.print(" ");
            else System.out.println(
        }
        sc.close();
    }
}


Compiler output:
Main.java:16: error: illegal start of expression
        }
        ^
1 error
Language: Java

package introduction_to_Programming_I_Array;

import java.util.Scanner;

public class Reversing_Numbers {

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

		while(n!=0) {
			int[] list = new int[n];

			for(i=0;i<n;i++) {
				list[i]=scan.nextInt();
			}

			for(j=n-1;j>=0;j--) {
				System.out.print(" "+list[j]);
			}

			System.out.println();
			n = scan.nextInt();
		}
		scan.close();
	}

}



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

public class Main {

	public static void main(String[] args) {

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

		int[] arr = new int[n];

		for(int i = 0; i < n; i++) {
			arr[n - 1 - i] = sc.nextInt();

		}

		for(int i = 0; i < n; i++) {
			System.out.print(arr[n - 1 - i]);
			if (i < n - 1) {
				System.out.print(" ");
			}
		}

		sc.close();
	}

}


Compiler output:
Main.java:5: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:5: error: cannot find symbol
		Scanner sc = 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;

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

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

try {

int N = Integer.parseInt(br.readLine());

String first[] = br.readLine().split("[\\s]+");
int array[] = new int[first.length];

for(int i = 0; i < first.length; i++){
array[i] = Integer.parseInt(first[i]);
}

for(int j = (first.length)-1; j >= 0; j--){
if(j==0)
System.out.print(array[j]);
System.out.print(array[j]+" ");
}
}

}

}


Compiler output:
Main.java:11: error: 'try' without 'catch', 'finally' or resource declarations
try {
^
1 error
Language: Java

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

public class MainTest {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int line = sc.nextInt();
		List<Integer> list = new ArrayList<>();
		for(int i = 0; i < line; i++){
			list.add(sc.nextInt());
		}
		Collections.reverse(list);
		for(int i = 0; i < list.size(); i++){
			if(i == 0){
				System.out.print(list.get(i));
			}else{
				System.out.print(" " + list.get(i));
			}
		}
	}

}



Compiler output:
Main.java:6: error: class MainTest is public, should be declared in a file named MainTest.java
public class MainTest {
       ^
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();
    List<Integer> arr = new ArrayList<>();
    for(int i = 0; i < n; i++) {
      arr.add(0, sc.nextInt());
    }
    for(int i = 0; i < n; i++) {
      if(i == n - 1) {
        Sytem.out.println(arr.get(i));
      } else {
      System.out.print(arr.get(i) + " ");}
    }
  }
}



Compiler output:
Main.java:13: error: package Sytem does not exist
        Sytem.out.println(arr.get(i));
             ^
1 error
Language: Java

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

class Main {
    private static int a;
    public static void main(String[] args){
    
     Scanner s = new Scanner(System.in);
    a=s.nextInt();
    int[] array= new int[a] ;
   for(int i=0;i<array.length;i++){
       array[i]=s.nextInt();
        }
   for(int x=array.length-1;x>=0;x++){
       if(i!=0){
       System.out.printf("%d",array[x]);
   }else{
    System.out.printf("%d\n",array[x]);
       
   }
}
}


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

package Array;

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

public class Reversing_Number {

	public static void main(String[] args) {

		// 入力文字列を取得
		Scanner sc = new Scanner(System.in);

		// 配列を作る
		ArrayList<Integer> list = new ArrayList<Integer>();
		int index_max = sc.nextInt();

		// リストにテキスト入力文字を格納
		for (int i = 0; i < index_max; i++) {
			list.add(sc.nextInt());
		}

		// 逆順に表示
		for (int index = index_max - 1; index >= 0; index--) {

			String number = list.get(index).toString();

			// 最後の数以外には空白を追加
			if (index != 0) {

				number = number + " ";
			}
			//
			System.out.print(number);

		}

	}
}

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

package Array;

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

public class Main{

	public static void main(String[] args) {

		// 入力文字列を取得
		Scanner sc = new Scanner(System.in);

		// 配列を作る
		ArrayList<Integer> list = new ArrayList<Integer>();
//		int index_max = sc.nextInt();

		// リストにテキスト入力文字を格納
		for (int i = 0; i < index_max; i++) {	
			//
//			list.add(sc.nextInt());
		}

//		// 逆順に表示
//		for (int index = index_max - 1; index >= 0; index--) {
//
//			String number = list.get(index).toString();
//
//			// 最後の数以外には空白を追加
//			if (index != 0) {
//
//				number = number + " ";
//			}
//			//
//			System.out.print(number);
//
//		}

	}
}

Compiler output:
Main.java:18: error: cannot find symbol
		for (int i = 0; i < index_max; i++) {	
		                    ^
  symbol:   variable index_max
  location: class Main
1 error
Language: C

#include<stdio.h>

int main()
{
 int i,a,j,z;
 int n[100];
 scanf("%d",&n);

 for(i=0;i<n;i++){
                  scanf("%d",&a[i]);
                 }
 for(i=n;i>0;i--){
                  printf(" %d\n",a[i]);          
                 }
 return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:11: warning: comparison between pointer and integer
    9 |  for(i=0;i<n;i++){
      |           ^
main.c:10:32: error: subscripted value is neither array nor pointer nor vector
   10 |                   scanf("%d",&a[i]);
      |                                ^
main.c:12:7: error: assignment to 'int' from 'int *' makes integer from pointer without a cast [-Wint-conversion]
   12 |  for(i=n;i>0;i--){
      |       ^
main.c:13:35: error: subscripted value is neither array nor pointer nor vector
   13 |                   printf(" %d\n",a[i]);
      |                                   ^
Language: C

#include<stdio.h>

int main()
{
 int i,a,j,z;
 int n[100];
 scanf("%d",&n);

 for(i=0;i<n;i++){
                  scanf("%d",&a[i]);
                 }
 for(i=n-1;i>=1;i--){
                  printf("%d \n",a[i]);          
                 }
 return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:11: warning: comparison between pointer and integer
    9 |  for(i=0;i<n;i++){
      |           ^
main.c:10:32: error: subscripted value is neither array nor pointer nor vector
   10 |                   scanf("%d",&a[i]);
      |                                ^
main.c:12:7: error: assignment to 'int' from 'int *' makes integer from pointer without a cast [-Wint-conversion]
   12 |  for(i=n-1;i>=1;i--){
      |       ^
main.c:13:35: error: subscripted value is neither array nor pointer nor vector
   13 |                   printf("%d \n",a[i]);
      |                                   ^
Language: C

#include<stdio.h>

int main()
{
 int i,a,j,z;
 int n[100];
 scanf("%d",&n);

 for(i=0;i<n;i++){
                  scanf("%d",&a[i]);
                 }
 for(i=n-1;i>=1;i--){
                  printf("%d ",a[i]);          
                 }
 return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:11: warning: comparison between pointer and integer
    9 |  for(i=0;i<n;i++){
      |           ^
main.c:10:32: error: subscripted value is neither array nor pointer nor vector
   10 |                   scanf("%d",&a[i]);
      |                                ^
main.c:12:7: error: assignment to 'int' from 'int *' makes integer from pointer without a cast [-Wint-conversion]
   12 |  for(i=n-1;i>=1;i--){
      |       ^
main.c:13:33: error: subscripted value is neither array nor pointer nor vector
   13 |                   printf("%d ",a[i]);
      |                                 ^
Language: C

#include<stdio.h>

int main()
{
 int i,a,j,z;
 int n[100];
 scanf("%d",&n);

 for(i=0;i<n;i++){
                  scanf("%d",&a[i]);
                 }
 for(i=n-1;i>=1;i--){
                  printf("%d ",a[i]);          
                 }
printf("%d\n",a[0]);

 return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:11: warning: comparison between pointer and integer
    9 |  for(i=0;i<n;i++){
      |           ^
main.c:10:32: error: subscripted value is neither array nor pointer nor vector
   10 |                   scanf("%d",&a[i]);
      |                                ^
main.c:12:7: error: assignment to 'int' from 'int *' makes integer from pointer without a cast [-Wint-conversion]
   12 |  for(i=n-1;i>=1;i--){
      |       ^
main.c:13:33: error: subscripted value is neither array nor pointer nor vector
   13 |                   printf("%d ",a[i]);
      |                                 ^
main.c:15:16: error: subscripted value is neither array nor pointer nor vector
   15 | printf("%d\n",a[0]);
      |                ^
Language: C

#include<stdio.h>

int main()
{

 int i,j;
 int n[100];
 scanf("%d",&n);

 for(i=0;i<n;i++){
                  scanf("%d",&n[i]);
                 }
 for(i=n-1;i>0;i--){
                  printf("%d ",n[i]);          
                 }
printf("%d\n",a[0]);

 return 0;
}


Compiler output:
main.c: In function 'main':
main.c:10:11: warning: comparison between pointer and integer
   10 |  for(i=0;i<n;i++){
      |           ^
main.c:13:7: error: assignment to 'int' from 'int *' makes integer from pointer without a cast [-Wint-conversion]
   13 |  for(i=n-1;i>0;i--){
      |       ^
main.c:16:15: error: 'a' undeclared (first use in this function)
   16 | printf("%d\n",a[0]);
      |               ^
main.c:16:15: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int main()
{

 int i,j,n;
 int a[100];
 scanf("%d",&n);

 for(i=0;i<n;i++){
                  scanf("%d",&a[i]);
                 }
 for(i=n-1;i>=1;i--){
                  printf("%d ",a[i]);          
                 }

 printf("%d\n",n[0]);

 return 0;
}


Compiler output:
main.c: In function 'main':
main.c:17:17: error: subscripted value is neither array nor pointer nor vector
   17 |  printf("%d\n",n[0]);
      |                 ^
Language: C

#include <stdio.h>
int main(void){
    int n,i,m[100];
    scanf("%d", &n);
    for(i = 0; i < n; i++){
        scanf("%d", &m[i]);
    }
    for(i = n-1; i >= 0; i--){
        printf("%d", n[i]);
        if(i != 0){
            printf("");
        }
    }
    printf("\n");
    return 0;
}



Compiler output:
main.c: In function 'main':
main.c:9:23: error: subscripted value is neither array nor pointer nor vector
    9 |         printf("%d", n[i]);
      |                       ^
Language: C

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



Compiler output:
main.c: In function 'main':
main.c:3:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'a'
    3 | int n,i a[i], m;
      |         ^
main.c:5:1: error: 'm' undeclared (first use in this function)
    5 | m = n / 2
      | ^
main.c:5:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:10: error: expected ';' before 'for'
    5 | m = n / 2
      |          ^
      |          ;
    6 | for ( i = 1; i < n + 1; n++ ){
      | ~~~
Language: C

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



Compiler output:
main.c: In function 'main':
main.c:3:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'a'
    3 | int n,i a[i], m;
      |         ^
main.c:5:1: error: 'm' undeclared (first use in this function)
    5 | m = n / 2;
      | ^
main.c:5:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:7: error: 'i' undeclared (first use in this function)
    6 | for ( i = 1; i < n + 1; n++ ){
      |       ^
main.c:7:14: error: 'a' undeclared (first use in this function)
    7 | scanf("%d", &a[i]);
      |              ^
Language: C

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


Compiler output:
main.c: In function 'main':
main.c:8:21: error: expected expression before '>' token
    8 | for ( i = n - 1; i => 0; i-- ){
      |                     ^
Language: C

#include <stdio.h>
int main(){
    int n;
    int i;
    int* list;
    
    scanf( "%d", &n );
    
    list = ( int* )malloc(( sizeof int ) * n );
    if( list == NULL ){
        exit();
    }
    
}


Compiler output:
main.c: In function 'main':
main.c:9:20: error: implicit declaration of function 'malloc' [-Wimplicit-function-declaration]
    9 |     list = ( int* )malloc(( sizeof int ) * n );
      |                    ^~~~~~
main.c:2:1: note: include '<stdlib.h>' or provide a declaration of 'malloc'
    1 | #include <stdio.h>
  +++ |+#include <stdlib.h>
    2 | int main(){
main.c:9:20: warning: incompatible implicit declaration of built-in function 'malloc' [-Wbuiltin-declaration-mismatch]
    9 |     list = ( int* )malloc(( sizeof int ) * n );
      |                    ^~~~~~
main.c:9:20: note: include '<stdlib.h>' or provide a declaration of 'malloc'
main.c:9:36: error: expected expression before 'int'
    9 |     list = ( int* )malloc(( sizeof int ) * n );
      |                                    ^~~
main.c:11:9: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
   11 |         exit();
      |         ^~~~
main.c:11:9: note: include '<stdlib.h>' or provide a declaration of 'exit'
main.c:11:9: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
main.c:11:9: note: include '<stdlib.h>' or provide a declaration of 'exit'
main.c:11:9: error: too few arguments to function 'exit'
Language: C

#include <stdio.h>
int main(){
    int n;
    int i;
    int* list;
    
    scanf( "%d", &n );
    
    list = ( int* )malloc(( sizeof int ) * n );
}
    


Compiler output:
main.c: In function 'main':
main.c:9:20: error: implicit declaration of function 'malloc' [-Wimplicit-function-declaration]
    9 |     list = ( int* )malloc(( sizeof int ) * n );
      |                    ^~~~~~
main.c:2:1: note: include '<stdlib.h>' or provide a declaration of 'malloc'
    1 | #include <stdio.h>
  +++ |+#include <stdlib.h>
    2 | int main(){
main.c:9:20: warning: incompatible implicit declaration of built-in function 'malloc' [-Wbuiltin-declaration-mismatch]
    9 |     list = ( int* )malloc(( sizeof int ) * n );
      |                    ^~~~~~
main.c:9:20: note: include '<stdlib.h>' or provide a declaration of 'malloc'
main.c:9:36: error: expected expression before 'int'
    9 |     list = ( int* )malloc(( sizeof int ) * n );
      |                                    ^~~
Language: C

#include <stdio.h>
int main(){
    int n;
    int i;
    int* list;
    
    scanf( "%d", &n );
    
    list = ( int* )malloc(( sizeof int ) * n );
    if( list == NULL ){
        exit();
    }
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:20: error: implicit declaration of function 'malloc' [-Wimplicit-function-declaration]
    9 |     list = ( int* )malloc(( sizeof int ) * n );
      |                    ^~~~~~
main.c:2:1: note: include '<stdlib.h>' or provide a declaration of 'malloc'
    1 | #include <stdio.h>
  +++ |+#include <stdlib.h>
    2 | int main(){
main.c:9:20: warning: incompatible implicit declaration of built-in function 'malloc' [-Wbuiltin-declaration-mismatch]
    9 |     list = ( int* )malloc(( sizeof int ) * n );
      |                    ^~~~~~
main.c:9:20: note: include '<stdlib.h>' or provide a declaration of 'malloc'
main.c:9:36: error: expected expression before 'int'
    9 |     list = ( int* )malloc(( sizeof int ) * n );
      |                                    ^~~
main.c:11:9: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
   11 |         exit();
      |         ^~~~
main.c:11:9: note: include '<stdlib.h>' or provide a declaration of 'exit'
main.c:11:9: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
main.c:11:9: note: include '<stdlib.h>' or provide a declaration of 'exit'
main.c:11:9: error: too few arguments to function 'exit'
Language: C

#include <stdio.h>
int main(){
    int n;
    int i;
    int* list;
    
    scanf( "%d", &n );
    
    list = ( int* )malloc(( sizeof int ) * n );
    if( list == NULL ){
        exit( 1 );
    }
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:20: error: implicit declaration of function 'malloc' [-Wimplicit-function-declaration]
    9 |     list = ( int* )malloc(( sizeof int ) * n );
      |                    ^~~~~~
main.c:2:1: note: include '<stdlib.h>' or provide a declaration of 'malloc'
    1 | #include <stdio.h>
  +++ |+#include <stdlib.h>
    2 | int main(){
main.c:9:20: warning: incompatible implicit declaration of built-in function 'malloc' [-Wbuiltin-declaration-mismatch]
    9 |     list = ( int* )malloc(( sizeof int ) * n );
      |                    ^~~~~~
main.c:9:20: note: include '<stdlib.h>' or provide a declaration of 'malloc'
main.c:9:36: error: expected expression before 'int'
    9 |     list = ( int* )malloc(( sizeof int ) * n );
      |                                    ^~~
main.c:11:9: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
   11 |         exit( 1 );
      |         ^~~~
main.c:11:9: note: include '<stdlib.h>' or provide a declaration of 'exit'
main.c:11:9: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
main.c:11:9: note: include '<stdlib.h>' or provide a declaration of 'exit'
Language: C


int main(void) {
	int n;
	int x[100];
	scanf("%d", &n);
	for (int i = 0; i < n; i++) {
		scanf_s("%d",&x[i]);
	}
	for (int p = n-1; p > 0; p--) {
			printf("%d ",x[p]);
	}
	printf("%d\n", x[0]);
}



Compiler output:
main.c: In function 'main':
main.c:5:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    5 |         scanf("%d", &n);
      |         ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | 
main.c:5:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    5 |         scanf("%d", &n);
      |         ^~~~~
main.c:5:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:7:17: error: implicit declaration of function 'scanf_s' [-Wimplicit-function-declaration]
    7 |                 scanf_s("%d",&x[i]);
      |                 ^~~~~~~
main.c:10:25: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   10 |                         printf("%d ",x[p]);
      |                         ^~~~~~
main.c:10:25: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:10:25: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:10:25: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:12:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   12 |         printf("%d\n", x[0]);
      |         ^~~~~~
main.c:12:9: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

int main(void) {
	int n;
	int x[100];
	scanf("%d", &n);
	for (int i = 0; i < n; i++) {
		scanf_s("%d",&x[i]);
	}
	for (int p = n-1; p > 0; p--) {
			printf("%d ",x[p]);
	}
	printf("%d", x[0]);
}


Compiler output:
main.c: In function 'main':
main.c:4:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    4 |         scanf("%d", &n);
      |         ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(void) {
main.c:4:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    4 |         scanf("%d", &n);
      |         ^~~~~
main.c:4:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:6:17: error: implicit declaration of function 'scanf_s' [-Wimplicit-function-declaration]
    6 |                 scanf_s("%d",&x[i]);
      |                 ^~~~~~~
main.c:9:25: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    9 |                         printf("%d ",x[p]);
      |                         ^~~~~~
main.c:9:25: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:9:25: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:9:25: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:11:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   11 |         printf("%d", x[0]);
      |         ^~~~~~
main.c:11:9: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include <stdio.h>

int main(void) {
	int n;
	int x[100];
	scanf("%d", &n);
	for (int i = 0; i < n; i++) {
		scanf_s("%d",&x[i]);
	}
	for (int p = n-1; p > 0; p--) {
			printf("%d ",x[p]);
	}
	printf("%d", x[0]);
}


Compiler output:
main.c: In function 'main':
main.c:8:17: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    8 |                 scanf_s("%d",&x[i]);
      |                 ^~~~~~~
      |                 scanf
Language: C

#include <stdio.h>

int main(void) {
	int n;
        scanf("%d", &n);
	int x[n];
	
	for (int i = 0; i < n; i++) {
		scanf_s("%d",&x[i]);
	}
	for (int p = n-1; p > 0; p--) {
			printf("%d ",x[p]);
	}
	printf("%d", x[0]);
}


Compiler output:
main.c: In function 'main':
main.c:9:17: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    9 |                 scanf_s("%d",&x[i]);
      |                 ^~~~~~~
      |                 scanf
Language: C


#include <stdio.h>

int main() {
	int n;
	
	scanf("%d", &n);
	int x[n];
	for (int i = 0; i < n; i++) {
		scanf_s("%d",&x[i]);
	}
	for (int p = n-1; p > 0; p--) {
			printf("%d ",x[p]);
	}
	printf("%d", x[0]);
}



Compiler output:
main.c: In function 'main':
main.c:10:17: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
   10 |                 scanf_s("%d",&x[i]);
      |                 ^~~~~~~
      |                 scanf
Language: C

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



Compiler output:
main.c: In function 'main':
main.c:5:16: error: expected ')' before numeric constant
    5 | for(i=0;i<n;i++0)
      |    ~           ^
      |                )
main.c:13:20: error: expected ';' before ':' token
   13 | printf("%d\n",a[0]):
      |                    ^
      |                    ;
Language: C

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



Compiler output:
main.c: In function 'main':
main.c:13:20: error: expected ';' before ':' token
   13 | printf("%d\n",a[0]):
      |                    ^
      |                    ;
Language: C

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



Compiler output:
main.c: In function 'main':
main.c:13:20: error: expected ';' before ':' token
   13 | printf("%d\n",a[0]):
      |                    ^
      |                    ;
Language: C

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



Compiler output:
main.c: In function 'main':
main.c:13:20: error: expected ';' before ':' token
   13 | printf("%d\n",a[0]):
      |                    ^
      |                    ;
Language: C

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


Compiler output:
main.c: In function 'main':
main.c:6:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'scanf'
    6 |   scanf("%d",&n);
      |   ^~~~~
main.c:8:17: error: 'num' undeclared (first use in this function)
    8 |     scanf("%d",&num);
      |                 ^~~
main.c:8:17: note: each undeclared identifier is reported only once for each function it appears in