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


using namespace std;
int main(){
  char str;
  while(1){
    str = getchar();
    if(str=='.'){
      cout<<str;
      break;
    }
    if(str!=' '){
      str=str-4;
      cout<<str;
    }else{
      cout<<" ";
    }
  }
  cout<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:11: error: 'getchar' was not declared in this scope
    6 |     str = getchar();
      |           ^~~~~~~
a.cc:1:1: note: 'getchar' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | 
a.cc:8:7: error: 'cout' was not declared in this scope
    8 |       cout<<str;
      |       ^~~~
a.cc:1:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | 
a.cc:13:7: error: 'cout' was not declared in this scope
   13 |       cout<<str;
      |       ^~~~
a.cc:13:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:15:7: error: 'cout' was not declared in this scope
   15 |       cout<<" ";
      |       ^~~~
a.cc:15:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:18:3: error: 'cout' was not declared in this scope
   18 |   cout<<endl;
      |   ^~~~
a.cc:18:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:18:9: error: 'endl' was not declared in this scope
   18 |   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 |
Language: C++

#include<iostream>
#include<string>
int main(){
	std::string str;
	while(std::getline(std::cin,str)){
	for(int i=0;i<str.size();i++){
		if(str[i]!=' ')str[i]+=1;
	}
	std::cout<<str<<std::endl;
	return 0;
}

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

#include <iostream>
#include <stdio.h>
#include <string>
#include <queue>
#include <cmath>
#include <stack>

#define int64 long long int

using namespace std;

char * caesar(char *);

int main()
{
	int i, c;
	char str[128];
	
	while(1){
		for(i=0; ; i++){
			c = getchar();
			if(c == '\n' || c == EOF) break;
			str[i] = c;
		}
		str[i] = 0;
		cout << caesar(str) << '\n';

		if(c == EOF) break;
	}

	return 0;
}

char * caesar(char *str){
	int len, i;
	len = strlen(str);
	while(1){
		for(i=0; i<len; i++){
			if(str[i] >= 'b' && str[i] <= 'z')
				str[i]--;
			else if(str[i] == 'a')
				str[i] = 'z';
		}
		for(i=0; i<len; i++){
			if(str[i] == 't' && str[i+1] == 'h'){
				if(str[i+2] == 'e' ||
					(str[i+2] == 'i' && str[i+3] == 's') ||
					(str[i+2] == 'a' && str[i+3] == 't'))
					return str;
			}
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'char* caesar(char*)':
a.cc:36:15: error: 'strlen' was not declared in this scope
   36 |         len = strlen(str);
      |               ^~~~~~
a.cc:7:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    6 | #include <stack>
  +++ |+#include <cstring>
    7 |
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main() {
	string str;
	string in;
	vector<string> s;
	while (cin >> in) s.push_back(in);
	for (int i=0; i<(int)s.size(); i++) {
		str += s[i];
		if (i<(int)s.size()-1) str += " ";
	}
	
	for (int i=1; i<=26; i++) {
		for (int j=0; j<n; j++) {
			if (str[j] == '.') continue;
			str[j] = str[j] + i;
			if (str[j] > 'z') str[j] = 'a' + str[j] - 'z';
		}
		if (str.find("the")!=str.npos || str.find("this")!=str.npos || str.find("that")!=str.npos) break;
	}
	
	cout << str << endl;
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'vector' was not declared in this scope
    9 |         vector<string> s;
      |         ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include <iostream>
  +++ |+#include <vector>
    2 | #include <string>
a.cc:9:22: error: expected primary-expression before '>' token
    9 |         vector<string> s;
      |                      ^
a.cc:9:24: error: 's' was not declared in this scope
    9 |         vector<string> s;
      |                        ^
a.cc:17:33: error: 'n' was not declared in this scope
   17 |                 for (int j=0; j<n; j++) {
      |                                 ^
Language: Java

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

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

Compiler output:
Main.java:9: error: unreported exception IOException; must be caught or declared to be thrown
while((str=br.readLine())!=null){
                      ^
1 error
Language: Java

rt java.util.*;
public class Main{

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a[] =new int[5];
        for (int i =0;i<a.length;i++){
            a[i] = sc.nextInt();
        }
        Arrays.sort(a);
        System.out.println(a[4]+" "+a[3]+" "+a[2]+" "+a[1]+" "+a[0]);
    }
}

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

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

		for(int i = 0; i < 5; i++){
			n[i]= sc.nextInt();
		}
		Arrays.sort(n);
		System.out.println(n[4]+" "+n[3]+" "+n[2]+" "+n[1]+" "+n[0]);
	

Compiler output:
Main.java:12: error: reached end of file while parsing
		System.out.println(n[4]+" "+n[3]+" "+n[2]+" "+n[1]+" "+n[0]);
		                                                             ^
1 error
Language: Java

import java.util.*;
public class Sort {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		Scanner sc = new Scanner(System.in);
		int a[] = new int[5];
		for(int i = 0; i<5; i++){
			a[i]=sc.nextInt();
		}
		Arrays.sort(a);
		for(int i = 4; i>-1;i--){
			System.out.println(a[i]);
		}
	}

}

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

import java.util.*;
public class Sort {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		Scanner sc = new Scanner(System.in);
		int a[] = new int[5];
		for(int i = 0; i<5; i++){
			a[i]=sc.nextInt();
		}
		Arrays.sort(a);
		for(int i = 4; i>0;i--){
			System.out.print(a[i]);
		}
		System.out.print(a[0]);
	}

}

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

import java.util.*;
public class Sort {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a[] = new int[5];
		for(int i = 0; i<5; i++){
			a[i]=sc.nextInt();
		}
		Arrays.sort(a);
	System.out.print(a[4]+" "+a[3]+" "+a[2]+" "+a[1]+" "+a[0]);
	}

}

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

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

public class Main {

	public static void main(String[] args) throws IOException {
		List<Integer> values = new ArrayList<Integer>();
		String s = new BufferedReader(new InputStreamReader(System.in)).readLine();
		String outString = "";
        String[] sarr = s.split(" ");
        int len = sarr.length;
        
        for(int i =0; i < len; i++){
            values.add(Integer.valueOf(sarr[i]));
        }

		Collections.sort(values);
		
		System.out.println(String.join(" ",values));
		
	}

}

Compiler output:
Main.java:24: error: no suitable method found for join(String,List<Integer>)
		System.out.println(String.join(" ",values));
		                         ^
    method String.join(CharSequence,CharSequence...) is not applicable
      (varargs mismatch; List<Integer> cannot be converted to CharSequence)
    method String.join(CharSequence,Iterable<? extends CharSequence>) is not applicable
      (argument mismatch; List<Integer> cannot be converted to Iterable<? extends CharSequence>)
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error
Language: Java

import java.util.Scanner;
public static void main(String[] args)
    {
        Scanner scan = new Scanner(System.in);
        int oldArray[] = new int[5];
        int t;
        for (int i=0; i<5; i++) {
            int a = scan.nextInt();
            oldArray[i] = a;
        }
        for (int j=0; j<4; j++){
            for (int m=0; m<4-j;m++)
            if (oldArray[m]<oldArray[m+1]){
                t = oldArray[m];
                oldArray[m] = oldArray[m+1];
                oldArray[m+1] = t;
            }
        }
        String delim = "";
        StringBuilder oo = new StringBuilder();
        for (int i=0; i<5; i++) {
            oo.append(delim).append(oldArray[i]);
            delim = " ";
        }
        System.out.println(oo);
    }

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

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


public class SortingFiveNumbers {

	public static void main(String[] a){
		
		int inputCount = 5;
		
		Scanner in = new Scanner(System.in);
		String input = in.nextLine();
		String[] numArray = input.split(" ");
		
		if (numArray.length == inputCount){
			ArrayList <Integer> output = new ArrayList<Integer>();
			for (String s : numArray){
				//convert to ArrayList<Integer>
				output.add(Integer.parseInt(s)); // to check if a number
			}
			
			Collections.sort(output);
			String outputSeq = "";
			for (Integer i: output){
				outputSeq = i + " " + outputSeq;
			}
			
			System.out.println(outputSeq);
		} else {
		}
		
	}
}

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

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


public class SortingFiveNumbers {

	public static void main(String[] a){
		
		int inputCount = 5;
		
		Scanner in = new Scanner(System.in);
		String input = in.nextLine();
		String[] numArray = input.split(" ");
		
		
		int[] temp = new int [inputCount];
		for (int i=0; i<inputCount; i++){
			temp[i] = Integer.parseInt(numArray[i]);
		}

		Arrays.sort(temp);
		
		System.out.println(temp[4] + " " +
						   temp[3] + " " +
						   temp[2] + " " +
						   temp[1] + " " +
						   temp[0]);
	}
}

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

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

public class InsertionSort
{
	public static void main(String args[])
	{
		int[] arr=new int[1000];
		Scanner inp=new Scanner(System.in);
		int n=5;
		int i;
		for(i=0; i<n; i++)
		{
			arr[i]=inp.nextInt();
		}
		Sortthis sorted=new Sortthis();
		sorted.sorting(arr, n);
		for(i=0; i<n; i++)
			System.out.print(arr[i]+" ");
	}
}

class Sortthis
{
	public void sorting(int[] arr, int n)
	{
		int i, j;
		for(i=1; i<n; i++)
		{
			j=i;
			while(j>0 && (arr[j]>arr[j-1]))
			{
				int temp=arr[j];
				arr[j]=arr[j-1];
				arr[j-1]=temp;
				j=j-1;
			}
		}
	}
}

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

import java.util.Scanner;
	class ?????????{

		public static void main(String[] args){
	Scanner sc=new Scanner(System.in);
long a;
long b;
long c;
long d;
long e;
int median;
long num[]=new long[6];
a=sc.nextInt();
b=sc.nextInt();
c=sc.nextInt();
d=sc.nextInt();
e=sc.nextInt();

num[0]=a;
num[1]=b;
num[2]=c;
num[3]=d;
num[4]=e;
num[5]=e;

for(int i=0;i<5;i++){
	for(int j=1;j<i-1;j++){
		if(num[i]<num[j]){
			int taihi;
			num[5] = num[j];
			num[j]=num[i];
			num[i]=num[5];
		}
	}
}
System.out.println(num[4]+" "+num[3]+" "+num[2]+" "+num[1]+" "+num[0]);


	}
	}

Compiler output:
Main.java:2: error: <identifier> expected
	class ?????????{
	     ^
1 error
Language: Java


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

public class SortingFiveNumbers {

	public static void main(String[] args) throws IOException{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		int array[] = new int [5];
		int a = Integer.parseInt(br.readLine());
		int b = Integer.parseInt(br.readLine());
		int c = Integer.parseInt(br.readLine());
		int d = Integer.parseInt(br.readLine());
		int e = Integer.parseInt(br.readLine());

		System.out.println(Comparator.reverseOrder());


	}

}

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

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

public class Main{

    public static void main(String[] args) throws IOException {

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

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

        List<Integer> converted = SortingFiveNumbers.convertToNumbers(input);

        StringBuilder builder = new StringBuilder();

        converted.stream().sorted((num1, num2) -> num2 - num1).forEach(num -> builder.append(num + " "));

        System.out.println(builder.delete(builder.length() - 1, builder.length() - 1));

    }

    /**
     * ????????????????????°????????????????????????????????????
     * 
     * @param input
     *            ???????????????
     * @return ??°???????????????
     */
    public static List<Integer> convertToNumbers(String[] input) {

        List<Integer> converted = new ArrayList<>();

        for (String string : input) {
            converted.add(Integer.parseInt(string));
        }

        return converted;
    }

}

Compiler output:
Main.java:15: error: cannot find symbol
        List<Integer> converted = SortingFiveNumbers.convertToNumbers(input);
                                  ^
  symbol:   variable SortingFiveNumbers
  location: class Main
1 error
Language: Java

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

public class Main{

    public static void main(String[] args) throws IOException {

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

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

        List<Integer> converted = SortingFiveNumbers.convertToNumbers(input);

        StringBuilder builder = new StringBuilder();

        converted.stream().sorted((num1, num2) -> num2 - num1).forEach(num -> builder.append(num + " "));

        System.out.println(builder.delete(builder.length() - 1, builder.length() - 1));

    }

    public static List<Integer> convertToNumbers(String[] input) {

        List<Integer> converted = new ArrayList<>();

        for (String string : input) {
            converted.add(Integer.parseInt(string));
        }

        return converted;
    }

}

Compiler output:
Main.java:15: error: cannot find symbol
        List<Integer> converted = SortingFiveNumbers.convertToNumbers(input);
                                  ^
  symbol:   variable SortingFiveNumbers
  location: class Main
1 error
Language: Java

Main class for AOJ where there is no input.
*/
public class Main{
   public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      String str = sc.nextLine();
      String[] arr = str.split(" ");
      int[] list = new int[arr.length];
      
      for(int i = 0; i < arr.length; i ++){
         list[i] = Integer.parseInt(arr[i]);
      }
      
      Arrays.sort(list);
      
      for(int i = arr.length - 1; i >= 0; i --){
         System.out.print(arr[i]);
         if(i != 0){
            System.out.print(" ");
         }
      }
      System.out.println();
   }//main   
}//class

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
Main class for AOJ where there is no input.
^
Main.java:1: error: <identifier> expected
Main class for AOJ where there is no input.
          ^
2 errors
Language: Java

3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
 
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
 
public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
 
        String[] inputArray = input.readLine().split(" ");
        ArrayList<Integer> inputList = new ArrayList<>();
        for (String each : inputArray) {
            inputList.add(Integer.parseInt(each));
        }
        Collections.sort(inputList);
        Collections.reverse(inputList);
        System.out.println(inputList.get(0) + " " + inputList.get(1) + " " + inputList.get(2) + " "
                + inputList.get(3) + " " + inputList.get(4));
    }
}
 

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
3
^
Main.java:22: error: class, interface, enum, or record expected
import java.io.IOException;
^
Main.java:23: error: class, interface, enum, or record expected
import java.io.InputStreamReader;
^
Main.java:24: error: class, interface, enum, or record expected
import java.util.ArrayList;
^
Main.java:25: error: class, interface, enum, or record expected
import java.util.Collections;
^
5 errors
Language: Java

import java.util.*;

public class Main{
    Main(){
	Scanner sc = new Scanner(System.in);
	int[] ary = new int[5];
	while(sc.hasNext()){
	    for(int i = 0; i < 5; i++)
		ary[i] = sc.nextInt();

	    Arrays.sort(ary);
	    System.out.print(Integer.toString(ary[4]));
	    for(int i = 3; i >= 0; i--)
		System.out.print(" " + Integer.toString(ary[i]));
	    System.out.println();
	}
    }

    public static void main(String[] args){
	new p0018();
    }
}

Compiler output:
Main.java:20: error: cannot find symbol
	new p0018();
	    ^
  symbol:   class p0018
  location: class Main
1 error
Language: Java

public class Main {
	public static void main(String[] args) {
		try {
		//	Problem0018_SortingFiveNumbers test = new Problem0018_SortingFiveNumbers();
			Main test = new Main();
			BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
			
			String line;
			while((line = reader.readLine()) != null) {
				String[] textArray = line.split(" ");
				int[] numbers = new int[5];
				for(int i = 0; i < numbers.length; i++) {
					numbers[i] = Integer.parseInt(textArray[i]);
				}
				test.sort(numbers);
				for(int i = 0; i < numbers.length-1; i++) {
					System.out.print(numbers[i] + " ");
				}
				System.out.println(numbers[numbers.length-1]);
			}
			
		} catch(Exception e) {
			e.printStackTrace();
		}
	/*
		Problem0018_SortingFiveNumbers test = new Problem0018_SortingFiveNumbers();
		for(int i = 0; i < 200; i++) {
			int[] array = new int[5];
			for(int j = 0; j < array.length; j++) {
				array[j] = (int)(Math.random() * 100);
			}
			test.shuffle(array);
			for(int number : array) {
				System.out.print(number +" ");
			}
			System.out.println();
			test.sort(array);
			for(int number : array) {
				System.err.print(number +" ");
			}
			System.err.println();
		}
	*/
	}
	void sort(int[] array) {
		int[] numbers = array;
		for(int i = 1; i < numbers.length; i++) {
			for(int j = i; j > 0; j--) {
				if(numbers[j-1] < numbers[j]) {
					int temporary = numbers[j];
					numbers[j] = numbers[j-1];
					numbers[j-1] = temporary;
				} else {
					break;
				}
			}
		}
	}
	void shuffle(int[] targetArray) {
		int[] array = targetArray;
		for(int i = 0; i < array.length; i++) {
			int position = (int)(Math.random() * (i+1));
			
			int temporary = array[position];
			array[position] = array[i];
			array[i] = temporary;
		}
	}
}

Compiler output:
Main.java:6: error: cannot find symbol
			BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
			^
  symbol:   class BufferedReader
  location: class Main
Main.java:6: error: cannot find symbol
			BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
			                            ^
  symbol:   class BufferedReader
  location: class Main
Main.java:6: error: cannot find symbol
			BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
			                                               ^
  symbol:   class InputStreamReader
  location: class Main
3 errors
Language: Java

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

public class Main {

	public static void main(String[] args)
			throws java.io.IOException{
		Scanner scan = new Scanner(System.in);
		int[] delta=new int[5];
		
			for(int j=0;j<5;j++){
				delta[j] = scan.nextInt();	
			}
			Arrays.sort(delta);
			System.out.print(delta[4]+" ");
System.out.print(delta[3+" "]);
System.out.print(delta[2+ " "]);
System.out.print(delta[1]+" ");
System.out.print(delta[0]);
			
	}
}

Compiler output:
Main.java:16: error: incompatible types: String cannot be converted to int
System.out.print(delta[3+" "]);
                        ^
Main.java:17: error: incompatible types: String cannot be converted to int
System.out.print(delta[2+ " "]);
                        ^
2 errors
Language: Java

import java.util.*;
public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner stdIn = new Scanner(System.in);
		int[] a = new int[5];
		for(int i=0; i<5; i++){
			a[i] = stdIn.nextInt();
		}
		boolean jdg;
		do{
			jdg = true;
			for(int i=0; i<4; i++){
				if(a[i]<a[i+1]){
					int t = a[i];
					a[i] = a[i+1];
					a[i+1] = t;
					jdg = false;
				}
			}
		} while(jdg == false);
		
		for(int i : a) System.out.print(i + " ");
		
		

	}

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

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


public class Test {
	public static void main(String args[]){
		Scanner stdIn = new Scanner(System.in);
		int[] intArray = new int[5];
		for(int i = 0;i < intArray.length; i++){
			intArray[i] = stdIn.nextInt();
		}

		Arrays.sort(intArray);

		for(int i = intArray.length - 1;i >= 0; i--){
			if(i == 0){
				System.out.println(intArray[i]);
			}else{
				System.out.print(intArray[i] + " ");
			}
		}
	}
}

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

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

public class Id0018 {
	public static void main(String[] args){
		ArrayList<String>	list;
		String[] str;
		BufferedReader br	=	new BufferedReader(new InputStreamReader(System.in));
		try {
			String s	=	br.readLine();
			list		=	new ArrayList<String>();
			str = s.split(" ");
			for(int i=0; i<str.length; i++){
				list.add(str[i]);
			}
			Collections.reverse(list);
			for(String a : list){
				System.out.print(a + " ");
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}

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

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

class Main{
  public static void main(String[] a){
    Scanner sc = new Scanner(System.in).useDelimiter("\n");
    ArrayList<String> alstr = new ArrayList<String>();
    while(sc.hasNext()){
      alstr.add(sc.next());
    }

    int[] foo = null;
    String[] strarr = null;
    int strlen = null;

    for (String str : alstr) {
      strarr = str.split(" ");
      strlen = strarr.length;
      foo = new int[strlen];

      for (int iter = 0; iter < strlen; iter++) {
        foo[iter] = Integer.parseInt(strarr[iter]);
      }

      Arrays.sort(foo);

      for (int iter = 0; iter < strlen / 2; iter++) {
        int tmp = foo[iter];
        foo[iter] = foo[strlen-iter-1];
        foo[strlen-iter-1] = tmp;
      }

      for (int iter = 0; iter < strlen; iter++) {
        System.out.print(foo[iter]);
        if (iter == strlen-1) System.out.println();
        else System.out.print(" ");
      }
    }
  }
}

Compiler output:
Main.java:15: error: incompatible types: <null> cannot be converted to int
    int strlen = null;
                 ^
1 error
Language: Java

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


public class　Main {

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

		try {
			while ((line = br.readLine()) != null) {
				line.trim();
				
				String[] words = line.split("\\s");
				ArrayList<Integer> num = new ArrayList<Integer>();
				for(String s : words) num.add(Integer.parseInt(s));
				
				Collections.sort(num);
				Collections.reverse(num);

				String str = num.toString();
				str = str.replaceAll("[\\[\\],]", "");
				System.out.println(str);
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

}

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

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

public class Sort1 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		while (sc.hasNext()) {
			String line = sc.nextLine();
			Scanner s = new Scanner(line);
			int[] a = new int[5];
			for (int i=0 ; i<5 ; i++){
			a[i] = s.nextInt(); }
			Arrays.sort(a);
			printReverse(a);
		}
	}
	static void printReverse(int[] a) {
		for (int i = a.length - 1; i >= 0; i--) {
			System.out.print(a[i]);
			if (i == 0)
				break;
			System.out.print(" ");
		}
		System.out.println();
	}
}

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

nclude<stdio.h>
int main(){
  int a,i,j,s[5];
  scanf("%d %d %d %d %d",&s[0],&s[1],&s[2],&s[3],&s[4]);
  for(i=0;i<5;i++){
    for(j=0;j<5;j++){
      if(s[j]<s[j+1]){
	a=s[j];
	s[j]=s[j+1];
	s[j+1]=a;
      }
    }
  }
  printf("%d %d %d %d %d\n",s[0],s[1],s[2],s[3],s[4]);
  return 0;
}
	

Compiler output:
main.c:1:7: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | nclude<stdio.h>
      |       ^
Language: C

#include<stdio.h>
int main(){
int a[5],buf,i,j;
scanf_s("%d %d %d %d %d",&a[0],&a[1],&a[2],&a[3],&a[4]);
	for(i=0;i<5;i++){
		for(j=5-1;j>0;j--){
			if(a[j-1]>a[j]){
				buf=a[j-1];
				a[j-1]=a[j];
				a[j]=buf;
			}
		}
	}
	printf("%d %d %d %d %d\n",a[0],a[1],a[2],a[3],a[4]);
	return 0;

}

Compiler output:
main.c: In function 'main':
main.c:4:1: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    4 | scanf_s("%d %d %d %d %d",&a[0],&a[1],&a[2],&a[3],&a[4]);
      | ^~~~~~~
      | scanf
Language: C

#include<stdio.h>

int main (void){

   int i,j,t,max,maxj;
   int array[5]={0};

   for(i=0;i<5;i++){
    scanf("%d",&array[i])
   }

  for(i=0;i<5;i++){
   max=0;
   maxj=i;
   for(j=i;j<5;j++){
     if(max<array[j]){
         max = array[j];
         maxj = j;
     }
   }
  t = array[i];
  array[i] = array[maxj];
  array[maxj] = t;
 
  }

  printf("%d %d %d %d %d",array[0],array[1],array[2],array[3],array[4]);


return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:26: error: expected ';' before '}' token
    9 |     scanf("%d",&array[i])
      |                          ^
      |                          ;
   10 |    }
      |    ~
Language: C

#include<stdio.h>

int main(void){
	int a[5],i,j;
	scanf("%d %d %d %d %d",&a[0],&a[1],&a[2],&a[3],&a[4],);

	for(i=0;i<5;i++){
		for(j=0;j<4;j++){
			int t;
			if(a[j]<a[j+1]){
				t=a[j];
				a[j]=a[j+1];
				a[j+1]=t;
			}
		}
	}
	printf("%d %d %d %d %d",a[0],a[1],a[2],a[3],a[4],);
	return 0;	
}

Compiler output:
main.c: In function 'main':
main.c:5:62: error: expected expression before ')' token
    5 |         scanf("%d %d %d %d %d",&a[0],&a[1],&a[2],&a[3],&a[4],);
      |                                                              ^
main.c:17:58: error: expected expression before ')' token
   17 |         printf("%d %d %d %d %d",a[0],a[1],a[2],a[3],a[4],);
      |                                                          ^
Language: C

#include <stdio.h>
 
int main()
{
   int array[100], n, c, d, position, swap;
 
   n=5;
 
 
   scanf ("%d%d%d%d%d",&a[0],&a[1],&a[2],&a[3],&a[4]);
 
   for ( c = 0 ; c < ( n - 1 ) ; c++ )
   {
      position = c;
 
      for ( d = c + 1 ; d < n ; d++ )
      {
         if ( array[position] > array[d] )
            position = d;
      }
      if ( position != c )
      {
         swap = array[c];
         array[c] = array[position];
         array[position] = swap;
      }
   }
 
 
      printf("%d ", array[c]);
 
   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:25: error: 'a' undeclared (first use in this function)
   10 |    scanf ("%d%d%d%d%d",&a[0],&a[1],&a[2],&a[3],&a[4]);
      |                         ^
main.c:10:25: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:13:15: error: assignment to expression with array type
   13 |             c = b[i];
      |               ^
main.c:15:18: error: assignment to 'int' from 'int *' makes integer from pointer without a cast [-Wint-conversion]
   15 |             b[i] = c;
      |                  ^
Language: C

#include<stdio.h>
int main(){
	int	n[6],i,j,t;
	for(i=0;i<5;i++)scanf("%d",&n[i]);
	for(i=0;i<5;i++){
		for(j=i;j<5;j++){
			if(n[i]<n[j]){
				t=n[i];n[i]=n[j];n[j]=t;
			}
		}
	}
	for(printf("%d",n[0]),i=1;i<5;i++)printf(" %d",n[i]);
	printf("\n");
	eixt(0);
}

Compiler output:
main.c: In function 'main':
main.c:14:9: error: implicit declaration of function 'eixt' [-Wimplicit-function-declaration]
   14 |         eixt(0);
      |         ^~~~
Language: C

int s[];M(int*a){return*1[&a]-*a;}
main(){
	scanf("%d%d%d%d%d",&s[0],&s[1],&s[2],&s[3],$s[4]);
	qsort(s,4,4,M);
	printf("%d %d %d %d %d\n",s[0],s[1],s[2],s[3],s[4]);
	return 0;
}

Compiler output:
main.c:1:9: error: return type defaults to 'int' [-Wimplicit-int]
    1 | int s[];M(int*a){return*1[&a]-*a;}
      |         ^
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
    2 | main(){
      | ^~~~
main.c: In function 'main':
main.c:3:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    3 |         scanf("%d%d%d%d%d",&s[0],&s[1],&s[2],&s[3],$s[4]);
      |         ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int s[];M(int*a){return*1[&a]-*a;}
main.c:3:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    3 |         scanf("%d%d%d%d%d",&s[0],&s[1],&s[2],&s[3],$s[4]);
      |         ^~~~~
main.c:3:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:3:52: error: '$s' undeclared (first use in this function); did you mean 's'?
    3 |         scanf("%d%d%d%d%d",&s[0],&s[1],&s[2],&s[3],$s[4]);
      |                                                    ^~
      |                                                    s
main.c:3:52: note: each undeclared identifier is reported only once for each function it appears in
main.c:4:9: error: implicit declaration of function 'qsort' [-Wimplicit-function-declaration]
    4 |         qsort(s,4,4,M);
      |         ^~~~~
main.c:5:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    5 |         printf("%d %d %d %d %d\n",s[0],s[1],s[2],s[3],s[4]);
      |         ^~~~~~
main.c:5:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:5:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:5:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c: At top level:
main.c:1:5: warning: array 's' assumed to have one element
    1 | int s[];M(int*a){return*1[&a]-*a;}
      |     ^
Language: C

a[9],m;main(){while(~scanf("%d",a+m++));for(qsort(a,--m,4,"\x8b\x00\x2b\x06\xc3");m;printf("%d%c",a[m],--m?32:10));

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | a[9],m;main(){while(~scanf("%d",a+m++));for(qsort(a,--m,4,"\x8b\x00\x2b\x06\xc3");m;printf("%d%c",a[m],--m?32:10));
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int]
main.c:1:6: error: type defaults to 'int' in declaration of 'm' [-Wimplicit-int]
    1 | a[9],m;main(){while(~scanf("%d",a+m++));for(qsort(a,--m,4,"\x8b\x00\x2b\x06\xc3");m;printf("%d%c",a[m],--m?32:10));
      |      ^
main.c:1:8: error: return type defaults to 'int' [-Wimplicit-int]
    1 | a[9],m;main(){while(~scanf("%d",a+m++));for(qsort(a,--m,4,"\x8b\x00\x2b\x06\xc3");m;printf("%d%c",a[m],--m?32:10));
      |        ^~~~
main.c: In function 'main':
main.c:1:22: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | a[9],m;main(){while(~scanf("%d",a+m++));for(qsort(a,--m,4,"\x8b\x00\x2b\x06\xc3");m;printf("%d%c",a[m],--m?32:10));
      |                      ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | a[9],m;main(){while(~scanf("%d",a+m++));for(qsort(a,--m,4,"\x8b\x00\x2b\x06\xc3");m;printf("%d%c",a[m],--m?32:10));
main.c:1:22: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | a[9],m;main(){while(~scanf("%d",a+m++));for(qsort(a,--m,4,"\x8b\x00\x2b\x06\xc3");m;printf("%d%c",a[m],--m?32:10));
      |                      ^~~~~
main.c:1:22: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:45: error: implicit declaration of function 'qsort' [-Wimplicit-function-declaration]
    1 | a[9],m;main(){while(~scanf("%d",a+m++));for(qsort(a,--m,4,"\x8b\x00\x2b\x06\xc3");m;printf("%d%c",a[m],--m?32:10));
      |                                             ^~~~~
main.c:1:85: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    1 | a[9],m;main(){while(~scanf("%d",a+m++));for(qsort(a,--m,4,"\x8b\x00\x2b\x06\xc3");m;printf("%d%c",a[m],--m?32:10));
      |                                                                                     ^~~~~~
main.c:1:85: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:85: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:85: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:1: error: expected declaration or statement at end of input
    1 | a[9],m;main(){while(~scanf("%d",a+m++));for(qsort(a,--m,4,"\x8b\x00\x2b\x06\xc3");m;printf("%d%c",a[m],--m?32:10));
      | ^
Language: C

a[9],m;main(){for(;~scanf("%d",a+m++)||qsort(a,--m,4,M)*m&&printf("%d%c",a[m],--m?32:10););}

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | a[9],m;main(){for(;~scanf("%d",a+m++)||qsort(a,--m,4,M)*m&&printf("%d%c",a[m],--m?32:10););}
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int]
main.c:1:6: error: type defaults to 'int' in declaration of 'm' [-Wimplicit-int]
    1 | a[9],m;main(){for(;~scanf("%d",a+m++)||qsort(a,--m,4,M)*m&&printf("%d%c",a[m],--m?32:10););}
      |      ^
main.c:1:8: error: return type defaults to 'int' [-Wimplicit-int]
    1 | a[9],m;main(){for(;~scanf("%d",a+m++)||qsort(a,--m,4,M)*m&&printf("%d%c",a[m],--m?32:10););}
      |        ^~~~
main.c: In function 'main':
main.c:1:21: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | a[9],m;main(){for(;~scanf("%d",a+m++)||qsort(a,--m,4,M)*m&&printf("%d%c",a[m],--m?32:10););}
      |                     ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | a[9],m;main(){for(;~scanf("%d",a+m++)||qsort(a,--m,4,M)*m&&printf("%d%c",a[m],--m?32:10););}
main.c:1:21: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | a[9],m;main(){for(;~scanf("%d",a+m++)||qsort(a,--m,4,M)*m&&printf("%d%c",a[m],--m?32:10););}
      |                     ^~~~~
main.c:1:21: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:40: error: implicit declaration of function 'qsort' [-Wimplicit-function-declaration]
    1 | a[9],m;main(){for(;~scanf("%d",a+m++)||qsort(a,--m,4,M)*m&&printf("%d%c",a[m],--m?32:10););}
      |                                        ^~~~~
main.c:1:54: error: 'M' undeclared (first use in this function)
    1 | a[9],m;main(){for(;~scanf("%d",a+m++)||qsort(a,--m,4,M)*m&&printf("%d%c",a[m],--m?32:10););}
      |                                                      ^
main.c:1:54: note: each undeclared identifier is reported only once for each function it appears in
main.c:1:60: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    1 | a[9],m;main(){for(;~scanf("%d",a+m++)||qsort(a,--m,4,M)*m&&printf("%d%c",a[m],--m?32:10););}
      |                                                            ^~~~~~
main.c:1:60: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:60: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:60: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

*a=&a;main(i){*a=~scanf("%d",++a)?!printf("%d%c",*--a,i+9,main(23)):qsort(a-5,5,4,"\213+Ã");%

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | *a=&a;main(i){*a=~scanf("%d",++a)?!printf("%d%c",*--a,i+9,main(23)):qsort(a-5,5,4,"\213+Ã");%
      | ^
main.c:1:2: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int]
    1 | *a=&a;main(i){*a=~scanf("%d",++a)?!printf("%d%c",*--a,i+9,main(23)):qsort(a-5,5,4,"\213+Ã");%
      |  ^
main.c:1:4: error: initialization of 'int *' from incompatible pointer type 'int **' [-Wincompatible-pointer-types]
    1 | *a=&a;main(i){*a=~scanf("%d",++a)?!printf("%d%c",*--a,i+9,main(23)):qsort(a-5,5,4,"\213+Ã");%
      |    ^
main.c:1:7: error: return type defaults to 'int' [-Wimplicit-int]
    1 | *a=&a;main(i){*a=~scanf("%d",++a)?!printf("%d%c",*--a,i+9,main(23)):qsort(a-5,5,4,"\213+Ã");%
      |       ^~~~
main.c: In function 'main':
main.c:1:7: error: type of 'i' defaults to 'int' [-Wimplicit-int]
main.c:1:19: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | *a=&a;main(i){*a=~scanf("%d",++a)?!printf("%d%c",*--a,i+9,main(23)):qsort(a-5,5,4,"\213+Ã");%
      |                   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | *a=&a;main(i){*a=~scanf("%d",++a)?!printf("%d%c",*--a,i+9,main(23)):qsort(a-5,5,4,"\213+Ã");%
main.c:1:19: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | *a=&a;main(i){*a=~scanf("%d",++a)?!printf("%d%c",*--a,i+9,main(23)):qsort(a-5,5,4,"\213+Ã");%
      |                   ^~~~~
main.c:1:19: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:36: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    1 | *a=&a;main(i){*a=~scanf("%d",++a)?!printf("%d%c",*--a,i+9,main(23)):qsort(a-5,5,4,"\213+Ã");%
      |                                    ^~~~~~
main.c:1:36: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:36: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:36: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:69: error: implicit declaration of function 'qsort' [-Wimplicit-function-declaration]
    1 | *a=&a;main(i){*a=~scanf("%d",++a)?!printf("%d%c",*--a,i+9,main(23)):qsort(a-5,5,4,"\213+Ã");%
      |                                                                     ^~~~~
main.c:1:95: error: expected expression before '%' token
    1 | *a=&a;main(i){*a=~scanf("%d",++a)?!printf("%d%c",*--a,i+9,main(23)):qsort(a-5,5,4,"\213+Ã");%
      |                                                                                               ^
main.c:1:95: error: expected declaration or statement at end of input
Language: C

#include<stdio.h>
#include<stdlib.h>

int a[6],i;

int comp(const void *p,const void *q){
	return *(int *)q-*(int *)p;
}

int main(){
	scanf("%d %d %d %d %d",&a[0],&a[1],&a[2],&a[3],&a[4]);
	qsort(a,5,sizeof(int),comp);
	for(i=0;i<5;i++)printf("%d%c",a[i],i==4?'':' ');
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:49: error: empty character constant
   13 |         for(i=0;i<5;i++)printf("%d%c",a[i],i==4?'':' ');
      |                                                 ^~
Language: C

#include<stdio.h>
#include<stdlib.h>

int a[6],i;

int comp(const void *p,const void *q){
	return *(int *)q-*(int *)p;
}

int main(){
	scanf("%d %d %d %d %d",&a[0],&a[1],&a[2],&a[3],&a[4]);
	qsort(a,5,sizeof(int),comp);
	for(i=0;i<5;i++)printf("%d%c",a[i],(i==4)?(''):(' '));
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:52: error: empty character constant
   13 |         for(i=0;i<5;i++)printf("%d%c",a[i],(i==4)?(''):(' '));
      |                                                    ^~
Language: C

import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int[] data = new int[5];
		for ( int i = 0; i < 5; i++ )
			data[i] = sc.nextInt();
		Arrays.sort(data);
		System.out.println(data[4]+" "+data[3]+" "+data[2]+" "+data[1]+" "+data[0]);
	}
}

Compiler output:
main.c:1:1: error: unknown type name 'import'
    1 | import java.util.*;
      | ^~~~~~
main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    1 | import java.util.*;
      |            ^
main.c:3:1: error: unknown type name 'public'
    3 | public class Main {
      | ^~~~~~
main.c:3:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Main'
    3 | public class Main {
      |              ^~~~
Language: C

main(){int a;for(;~scanf("%d",&a);){if(a>9)while(1);if(a<0)abort();}

Compiler output:
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
    1 | main(){int a;for(;~scanf("%d",&a);){if(a>9)while(1);if(a<0)abort();}
      | ^~~~
main.c: In function 'main':
main.c:1:20: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | main(){int a;for(;~scanf("%d",&a);){if(a>9)while(1);if(a<0)abort();}
      |                    ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | main(){int a;for(;~scanf("%d",&a);){if(a>9)while(1);if(a<0)abort();}
main.c:1:20: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | main(){int a;for(;~scanf("%d",&a);){if(a>9)while(1);if(a<0)abort();}
      |                    ^~~~~
main.c:1:20: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:60: error: implicit declaration of function 'abort' [-Wimplicit-function-declaration]
    1 | main(){int a;for(;~scanf("%d",&a);){if(a>9)while(1);if(a<0)abort();}
      |                                                            ^~~~~
main.c:1:1: note: include '<stdlib.h>' or provide a declaration of 'abort'
  +++ |+#include <stdlib.h>
    1 | main(){int a;for(;~scanf("%d",&a);){if(a>9)while(1);if(a<0)abort();}
main.c:1:60: warning: incompatible implicit declaration of built-in function 'abort' [-Wbuiltin-declaration-mismatch]
    1 | main(){int a;for(;~scanf("%d",&a);){if(a>9)while(1);if(a<0)abort();}
      |                                                            ^~~~~
main.c:1:60: note: include '<stdlib.h>' or provide a declaration of 'abort'
main.c:1:1: error: expected declaration or statement at end of input
    1 | main(){int a;for(;~scanf("%d",&a);){if(a>9)while(1);if(a<0)abort();}
      | ^~~~
Language: C

#include <stdio.h>

void swap(int *x, int *y){
	int temp;
	temp = *x;
	*x = *y;
	*y = temp;
}

int main(void){
	int i;
	int lbflag;
	int num[5];
	for(i = 0; i < 5; i++){
		scanf("%d",num+i);
	}
	while(1){
		lbflag = 1;
		for(i = 0; i < 4; i++){
			if(num[i] < num[i+1]){
				swap(num+i, num+i+1);
			}
		}
		for(i = 0; i < 4; i++){
			if(num[i] < num[i+1]){
				lbflag = 0;
				break;
			}
		}
		if(lbflag){break;}
	}
	for(i = 0; i < 5; i++){
		printf("%d",num[i]);
		if(i != 4){putchar(' ');}
	}
	putchar('\n');
	return 0;

Compiler output:
main.c: In function 'main':
main.c:37:9: error: expected declaration or statement at end of input
   37 |         return 0;
      |         ^~~~~~
Language: C

#include <stdio.h> 
void qsort(int *data,int size);
void swap(int *a,int *b);
int main(void){
int i;
int data[5];
for(i=0;i<5;i++) scanf("%d",&a[i]);
qsort(data,5);
for(i=0;i<5;i++) printf("%d ",a[i]);
return 0;
}
vod qsort(int *data,int size){
int i,last=1;
if(size<2)return;
for(i=1;i<size;i++){
if(data[0]<data[i]){ swap(&data[last],&data[i]);
last++;
}
}
swap(&data[0],&data[last-1]);
qsort(data,last);
qsort(data+last,size-last);
}
void swap(int *a,int *b){
int work;
work=a[0];
a[0]=b[0];
b[0]=work;
}

Compiler output:
main.c: In function 'main':
main.c:7:30: error: 'a' undeclared (first use in this function)
    7 | for(i=0;i<5;i++) scanf("%d",&a[i]);
      |                              ^
main.c:7:30: note: each undeclared identifier is reported only once for each function it appears in
main.c: At top level:
main.c:12:1: error: unknown type name 'vod'; did you mean 'void'?
   12 | vod qsort(int *data,int size){
      | ^~~
      | void
main.c:12:5: error: conflicting types for 'qsort'; have 'int(int *, int)'
   12 | vod qsort(int *data,int size){
      |     ^~~~~
main.c:2:6: note: previous declaration of 'qsort' with type 'void(int *, int)'
    2 | void qsort(int *data,int size);
      |      ^~~~~
main.c: In function 'qsort':
main.c:14:11: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch]
   14 | if(size<2)return;
      |           ^~~~~~
main.c:12:5: note: declared here
   12 | vod qsort(int *data,int size){
      |     ^~~~~