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

import java.util.Scanner;

class Main{
	public static void main(String[] args){
		
		Scanner sc = new Scanner(System.in);
		int[] a = new int[3];
		a[0] = scan.nextInt();
		a[1] = scan.nextInt();
		a[2] = scan.nextInt();
		
		java.util.Arrays.sort(a);
		System.out.println(a[0]+" "+a[1]+" "+a[2]);
		
	}
}


Compiler output:
Main.java:8: error: cannot find symbol
		a[0] = scan.nextInt();
		       ^
  symbol:   variable scan
  location: class Main
Main.java:9: error: cannot find symbol
		a[1] = scan.nextInt();
		       ^
  symbol:   variable scan
  location: class Main
Main.java:10: error: cannot find symbol
		a[2] = scan.nextInt();
		       ^
  symbol:   variable scan
  location: class Main
3 errors
Language: Java

import java.util.Scanner;

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

    int[] num = new int[3];
    num[0] = sin.nextInt();
    num[1] = sin.nextInt();
    num[2] = sin.nextInt();

    for( int i = 0, tmp; i < num.length -1; i++) {
      for( int j = 1; j < num.length - i; j++)
      if( num[j-1] > num[j] ) {
        temp = num[j-1];
        num[j-1] = num[j];
        num[j] = tmp;
      }
    }

    System.out.println(num[0] + " " + num[1] + " " + num[2]);
    sin.close();
  }
}


Compiler output:
Main.java:17: error: cannot find symbol
        temp = num[j-1];
        ^
  symbol:   variable temp
  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 a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int tmp;
		if(a>b) {
					tmp=a;
					a=b;
					b=tmp;
		}
		if(b>c) {
			tmp=b;
			b=c;
			c=tmp;
		}
		if(a>b) {
			tmp=a;
			a=b;
			b=tmp;
		}



			System.out.println("%d %d %d",a,b,c);
	}
}




Compiler output:
Main.java:28: error: no suitable method found for println(String,int,int,int)
			System.out.println("%d %d %d",a,b,c);
			          ^
    method PrintStream.println() is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(boolean) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(char) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(int) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(long) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(float) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(double) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(char[]) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(String) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.println(Object) is not applicable
      (actual and formal argument lists differ in length)
1 error
Language: Java

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

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a[] =new int[3];
		for(int i = 0;i < 3 ;i++) {
			a[i] = scan.nextInt();
		}
		Arrays.sort(a);
		
		for(int j=0;j<3;j++) {
			System.out.print(a[j]);
			if(j != c) {
				System.out.print(" ");
			}else {

			}
		}
		System.out.println();
		scan.close();
		}
}



Compiler output:
Main.java:16: error: cannot find symbol
			if(j != c) {
			        ^
  symbol:   variable c
  location: class Main
1 error
Language: Java


import java.util.Scanner;

public class SortingTreeNumbers {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);

		int[] a = new int[3];

		for(int i = 0; i < a.length; i++) {
			a[i] = sc.nextInt();
			for(int j = 0; j < i; j++) {
				if(a[i] < a[j]) swap(a, i, j);
			}
		}

		for(int i = 0; i < a.length; i++)
			System.out.print(a[i]);

		System.out.println();
	}

	public static void swap(int a[], int i, int j) {
		int k = a[i];
		a[i] = a[j];
		a[j] = k;
	}

}



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


import java.util.Scanner;

public class SortingTreeNumbers {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);

		int[] a = new int[3];

		for(int i = 0; i < a.length; i++) {
			a[i] = sc.nextInt();
			for(int j = 0; j < i; j++) {
				if(a[i] < a[j]) swap(a, i, j);
			}
		}

		for(int i = 0; i < a.length; i++)
			System.out.print(a[i] + " ");

		System.out.println();
	}

	public static void swap(int a[], int i, int j) {
		int k = a[i];
		a[i] = a[j];
		a[j] = k;
	}

}



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

import java.util.Scanner;

public class ITP12C {

	public static void Main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String input = sc.nextLine();
		String[] sdata = input.split(" ");
		int[] idata = new int[3];
		boolean condition = true; // 入力された数値が条件範囲内かを確認するための変数
		int temp = 0; // 一時的にデータを保存しておく変数

		for (int i = 0; i < sdata.length; i++) {
			idata[i] = Integer.parseInt(sdata[i]);
			if (idata[i] <= 0 || idata[i] > 1000) {
				condition = false;
				break;
			}
		}

		if (condition) {
			for (int i = 0; i < idata.length - 1; i++) {
				for (int j = i + 1; j < idata.length; j++) {
					if (idata[j - 1] > idata[j]) {
						temp = idata[j];
						idata[j] = idata[j - 1];
						idata[j - 1] = temp;
					}
				}
			}

			for (int i = 0; i < idata.length; i++) {
				System.out.print(idata[i]);

			}
		}
	}

}


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

package kadai;
import java.util.Scanner;
public class kadai {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int[] d = new int[3];
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		if (a < b && a < c)
			d[0] = a;
		else if (a < b)
			d[1] = a;
		else
			d[2] = a;
		if (b < a && b < c)
			d[0] = b;
		else if (b < c)
			d[1] = b;
		else
			d[2] = b;
		if (c < a && c < b)
			d[0] = c;
		else if (c < b)
			d[1] = c;
		else
			d[2] = c;
		for (int i = 0; i < d.length; i++)
			System.out.print(d[i] + " ");
		System.out.println();
		sc.close();
	}

}



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

package kadai;
import java.util.Scanner;
public class kadai {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int[] d = new int[3];
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		if (a < b && a < c)
			d[0] = a;
		else if (a < b)
			d[1] = a;
		else
			d[2] = a;
		if (b < a && b < c)
			d[0] = b;
		else if (b < c)
			d[1] = b;
		else
			d[2] = b;
		if (c < a && c < b)
			d[0] = c;
		else if (c < b)
			d[1] = c;
		else
			d[2] = c;
		for (int i = 0; i < d.length; i++)
			System.out.print(d[i] + " ");
		System.out.println();
	sc.close();
	}

}



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

public class Main {
	    public static void main(String[] args){
	        Scanner sc = new Scanner(System.in);
	            int a=sc.nextInt();
	            int b=sc.nextInt();
	            int c=sc.nextInt();
	            if(a<b && b<c){
	                System.out.println("Yes");
	            }else{
	                System.out.println("No");
	            }
	        }
	    }




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

import java.util.Scanner;

public class Main {
public static void main(String[] args) {
int i, j, tmp;
int[] a = { 0, 0, 0 };
Scanner s = new Scanner(System.in);

for (i = 0; i < 3; i++)
a[i]=s.nextInt();
for (i = 0; i < 2; i++)
for (j = i + 1; j < 3; j++)
if (a[i] > a[j]) {
tmp = a[i];
a[i] = a[j];
a[j] = tmp;
}


System.out.println(a[0]+" "+a[1]+ " "+a[2]);
}

}import java.util.Scanner;

public class Main {
public static void main(String[] args) {
int i, j, tmp;
int[] a = { 0, 0, 0 };
Scanner s = new Scanner(System.in);

for (i = 0; i < 3; i++)
a[i]=s.nextInt();
for (i = 0; i < 2; i++)
for (j = i + 1; j < 3; j++)
if (a[i] > a[j]) {
tmp = a[i];
a[i] = a[j];
a[j] = tmp;
}


System.out.println(a[0]+" "+a[1]+ " "+a[2]);
}

}




Compiler output:
Main.java:23: error: class, interface, enum, or record expected
}import java.util.Scanner;
 ^
1 error
Language: Java

import java.util.Scanner;

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

 int a;
 int b;
int c;

Scanner s = new Scanner(System.in);
a=s.nextInt();
b=s.nextInt();
c=s.nextInt()
if(a<b){b=a;}
if(b<c){c=b;}
if(a>b){System.out.println(a+""+b+""+c)}
}}




Compiler output:
Main.java:13: error: ';' expected
c=s.nextInt()
             ^
Main.java:16: error: ';' expected
if(a>b){System.out.println(a+""+b+""+c)}
                                       ^
2 errors
Language: Java

import java.util.Scanner;

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

 int a;
 int b;
int c;

Scanner s = new Scanner(System.in);
a=s.nextInt();
b=s.nextInt();
c=s.nextInt();
if(a<b){b=a;}
if(b<c){c=b;}
if(a>b){System.out.println(a+""+b+""+c)}
}}




Compiler output:
Main.java:16: error: ';' expected
if(a>b){System.out.println(a+""+b+""+c)}
                                       ^
1 error
Language: Java

import java.util.Scanner;

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

 int a;
 int b;
int c;

Scanner s = new Scanner(System.in);
a=s.nextInt();
b=s.nextInt();
c=s.nextInt();
if(a<b){b=a;}
if(b<c){c=b;}
if(a>b){System.out.println(a+" "+b+" "+c)}
}}




Compiler output:
Main.java:16: error: ';' expected
if(a>b){System.out.println(a+" "+b+" "+c)}
                                         ^
1 error
Language: Java

import java.util.Scanner;

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

 int a;
 int b;
int c;

Scanner s = new Scanner(System.in);
a=s.nextInt();
b=s.nextInt();
c=s.nextInt()
if(a>b){if(c>a)System.out.println(b+" "+a+" "+c);}
else if(c<b){System.out.println(c+" "+b+" "+a);}
else{System.out.println(b+" "+c+" "+a)}}else
{if(c<a){System.out.println(c+""+a+""+b);}
else if(c>b){System.out.println(a+" "+b+" "+c)}else{System.out.println(a+" "+c+" "+b);}}}}


Compiler output:
Main.java:13: error: ';' expected
c=s.nextInt()
             ^
Main.java:16: error: ';' expected
else{System.out.println(b+" "+c+" "+a)}}else
                                      ^
Main.java:16: error: illegal start of type
else{System.out.println(b+" "+c+" "+a)}}else
                                        ^
Main.java:18: error: ';' expected
else if(c>b){System.out.println(a+" "+b+" "+c)}else{System.out.println(a+" "+c+" "+b);}}}}
                                              ^
Main.java:18: error: class, interface, enum, or record expected
else if(c>b){System.out.println(a+" "+b+" "+c)}else{System.out.println(a+" "+c+" "+b);}}}}
                                                                                         ^
5 errors
Language: Java

import java.util.Scanner;

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

 int a;
 int b;
int c;

Scanner s = new Scanner(System.in);
a=s.nextInt();
b=s.nextInt();
c=s.nextInt()
if(a>b){
if(c>a)System.out.println(b+" "+a+" "+c);}

else if(c<b){System.out.println(c+" "+b+" "+a);}
else{System.out.println(b+" "+c+" "+a);}
}else
{if(c<a){System.out.println(c+" "+a+" "+b);}
else if(c>b){System.out.println(a+" "+b+" "+c);}
else{System.out.println(a+" "+c+" "+b);
}}}}


Compiler output:
Main.java:13: error: ';' expected
c=s.nextInt()
             ^
Main.java:19: error: illegal start of type
}else
 ^
Main.java:23: error: class, interface, enum, or record expected
}}}}
   ^
3 errors
Language: Java

import java.util.Scanner;

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

 int a;
 int b;
 int c;

Scanner s = new Scanner(System.in);
a=s.nextInt();
b=s.nextInt();
c=s.nextInt();
if(a>b){if(c>a)System.out.println(b+" "+a+" "+c);}
else if(c<b){System.out.println(c+" "+b+" "+a);}
else{System.out.println(b+" "+c+" "+a)}}else
{if(c<a){System.out.println(c+""+a+""+b);}else if(c>b){System.out.println(a+" "+b+" "+c)}
else{System.out.println(a+" "+c+" "+b);}
}
}
}


Compiler output:
Main.java:16: error: ';' expected
else{System.out.println(b+" "+c+" "+a)}}else
                                      ^
Main.java:16: error: illegal start of type
else{System.out.println(b+" "+c+" "+a)}}else
                                        ^
Main.java:17: error: ';' expected
{if(c<a){System.out.println(c+""+a+""+b);}else if(c>b){System.out.println(a+" "+b+" "+c)}
                                                                                        ^
Main.java:21: error: class, interface, enum, or record expected
}
^
4 errors
Language: Java

import java.util.Scanner;

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

 int a;
 int b;
 int c;

Scanner s = new Scanner(System.in);
a=s.nextInt();
b=s.nextInt();
c=s.nextInt();
if(a>b){if(c>a)System.out.println(b+" "+a+" "+c);}
else if(c<b){System.out.println(c+" "+b+" "+a);}
else{System.out.println(b+" "+c+" "+a)}}else
{if(c<a){System.out.println(c+" "+a+" "+b);}else if(c>b){System.out.println(a+" "+b+" "+c)}
else{System.out.println(a+" "+c+" "+b);}
}
}
}


Compiler output:
Main.java:16: error: ';' expected
else{System.out.println(b+" "+c+" "+a)}}else
                                      ^
Main.java:16: error: illegal start of type
else{System.out.println(b+" "+c+" "+a)}}else
                                        ^
Main.java:17: error: ';' expected
{if(c<a){System.out.println(c+" "+a+" "+b);}else if(c>b){System.out.println(a+" "+b+" "+c)}
                                                                                          ^
Main.java:21: error: class, interface, enum, or record expected
}
^
4 errors
Language: Java

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

public class Main {

 private BufferedReader reader = new BufferedReader(new InputStreamReader(System.in), 1);

 private String inputData = null;

 private String[] data;

 private int[] values;

 public static void main(String args[]) {
  new Main().start();
 }

 public void start() {
  try {
   this.inputData = reader.readLine();
  } catch (IOException e) {
   e.printStackTrace();
  }

  this.data = this.inputData.split(" ");
  this.values = new int[this.data.length];
  for (int i = 0; i < this.data.length; i++) {
   this.values[i] = Integer.parseInt(this.data[i]);
  }

  Arrays.sort(this.values);

  for (int i = 0; i < this.values.length-1; i++) {
   System.out.print(this.values[i] + " ");
  }
  System.out.println(this.values[this.values-1]);
 }

}

Compiler output:
Main.java:38: error: bad operand types for binary operator '-'
  System.out.println(this.values[this.values-1]);
                                            ^
  first type:  int[]
  second type: int
1 error
Language: Java

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

public class ITP1_2C {
    public static void main(String args[]){
	Scanner in= new Scanner(System.in);
	ArrayList<Short> list = new ArrayList<Short>();
        list.add(in.nextShort());
        list.add(in.nextShort());
        list.add(in.nextShort());
	Collections.sort(list);

	byte c = 0;
	String s;
	for (Short i: list){
		if (c <list.size())
			s = " ";
		else
			s = "";
	        System.out.printf("%d%s", i, s);
	}
        System.out.println();
    }   
}

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

public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int a = scanner.nextInt();
		int b = scanner.nextInt();
		int c = scanner.nextInt();
		scanner.close();
		int tmp;
		if (b < a) {
			tmp = b;
			b = a;
			a = tmp;
		}
		if (c < b) {
			tmp = c;
			c = b;
			b = tmp;
		}
		if (b < a) {
			tmp = b;
			b = a;
			a = tmp;
		}
		System.out.println(a+" "+b+" "+c);
	}
}

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

import java.util.*;
  
class Main{
  public static void main(String [] args){
    Scanner scan = new Scanner(System.in);
    int a = Integer.parseInt(scan.next());
    int b = Integer.parseInt(scan.next()); 
    int c = Integer.parseInt(scan.next());
    ArrayList num = new ArrayList();
    num.add(new Data(a));
    num.add(new Data(b));
    num.add(new Data(c));
    Object[] sortnum = num.toArray();
    Arrays.sort(sortnum, DataComparator());

    for(int i; i < sortnum.length; i++;){
      System.out.println((Data)num.toArray()[i]);
    }
  }
}

Compiler output:
Main.java:16: error: ')' expected
    for(int i; i < sortnum.length; i++;){
                                      ^
Main.java:16: error: illegal start of expression
    for(int i; i < sortnum.length; i++;){
                                       ^
2 errors
Language: Java

import java.util.*;
  
class Main{
  public static void main(String [] args){
    Scanner scan = new Scanner(System.in);
    int a = Integer.parseInt(scan.next());
    int b = Integer.parseInt(scan.next()); 
    int c = Integer.parseInt(scan.next());
    ArrayList num = new ArrayList();
    num.add(new Data(a));
    num.add(new Data(b));
    num.add(new Data(c));
    Object[] sortnum = num.toArray();
    Arrays.sort(sortnum, DataComparator());

    for(int i = 0; i < sortnum.length; i++;){
      System.out.println((Data)num.toArray()[i]);
    }
  }
}

Compiler output:
Main.java:16: error: ')' expected
    for(int i = 0; i < sortnum.length; i++;){
                                          ^
Main.java:16: error: illegal start of expression
    for(int i = 0; i < sortnum.length; i++;){
                                           ^
2 errors
Language: Java

import java.util.*;
 
class SortNum{
  public static void main(String [] args){
    Scanner scan = new Scanner(System.in);
    int a = Integer.parseInt(scan.next());
    int b = Integer.parseInt(scan.next());
    int c = Integer.parseInt(scan.next());
    ArrayList<Integer> num = new ArrayList<Integer>();
    num.add(a);
    num.add(b);
    num.add(c);
    Collections.sort(num);
    for(int i = 0; i < num.length; i++){ 
      System.out.println(num[i] + " ");
    }
  System.out.println();
}

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

import java.util.*;
  
class SortNum{
  public static void main(String [] args){
    Scanner scan = new Scanner(System.in);
    int a = Integer.parseInt(scan.next());
    int b = Integer.parseInt(scan.next());
    int c = Integer.parseInt(scan.next());
    ArrayList<Integer> num = new ArrayList<Integer>();
    num.add(a);
    num.add(b);
    num.add(c);
    Collections.sort(num);
    for(int i = 0; i < num.length; i++){ 
      System.out.println(num[i] + " ");
    }
  System.out.println();
  }
}

Compiler output:
Main.java:14: error: cannot find symbol
    for(int i = 0; i < num.length; i++){ 
                          ^
  symbol:   variable length
  location: variable num of type ArrayList<Integer>
Main.java:15: error: array required, but ArrayList<Integer> found
      System.out.println(num[i] + " ");
                            ^
2 errors
Language: Java

import java.util.*;
   
class SortNum{
  public static void main(String [] args){
    Scanner scan = new Scanner(System.in);
    int a = Integer.parseInt(scan.next());
    int b = Integer.parseInt(scan.next());
    int c = Integer.parseInt(scan.next());
    ArrayList<Integer> num = new ArrayList<Integer>();
    num.add(a);
    num.add(b);
    num.add(c);
    Collections.sort(num);
　　int[] array =(Integer[])num.toArray(new int[num.size()]);

    for(int i = 0; i < array.length; i++){ 
      System.out.println(array[i] + " ");
    }
  System.out.println();
  }
}

Compiler output:
Main.java:14: error: illegal character: '\u3000'
??int[] array =(Integer[])num.toArray(new int[num.size()]);
^
Main.java:14: error: illegal character: '\u3000'
??int[] array =(Integer[])num.toArray(new int[num.size()]);
 ^
2 errors
Language: Java

import java.util.*;
    
class SortNum{
  public static void main(String [] args){
    Scanner scan = new Scanner(System.in);
    int a = Integer.parseInt(scan.next());
    int b = Integer.parseInt(scan.next());
    int c = Integer.parseInt(scan.next());
    ArrayList<Integer> num = new ArrayList<Integer>();
    num.add(a);
    num.add(b);
    num.add(c);
    Collections.sort(num);
    int[] array =(Integer[])num.toArray(new int[num.size()]);
 
    for(int i = 0; i < array.length; i++){ 
      System.out.println(array[i] + " ");
    }
  System.out.println();
  }
}

Compiler output:
Main.java:14: error: no suitable method found for toArray(int[])
    int[] array =(Integer[])num.toArray(new int[num.size()]);
                               ^
    method Collection.<T#1>toArray(IntFunction<T#1[]>) is not applicable
      (cannot infer type-variable(s) T#1
        (argument mismatch; int[] cannot be converted to IntFunction<T#1[]>))
    method ArrayList.<T#2>toArray(T#2[]) is not applicable
      (inference variable T#2 has incompatible bounds
        equality constraints: int
        upper bounds: Object)
  where T#1,T#2 are type-variables:
    T#1 extends Object declared in method <T#1>toArray(IntFunction<T#1[]>)
    T#2 extends Object declared in method <T#2>toArray(T#2[])
Main.java:14: error: incompatible types: Integer[] cannot be converted to int[]
    int[] array =(Integer[])num.toArray(new int[num.size()]);
                 ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
2 errors
Language: Java

import java.util.*;
     
class SortNum{
  public static void main(String [] args){
    Scanner scan = new Scanner(System.in);
    int a = Integer.parseInt(scan.next());
    int b = Integer.parseInt(scan.next());
    int c = Integer.parseInt(scan.next());
    ArrayList<Integer> num = new ArrayList<Integer>();
    num.add(a);
    num.add(b);
    num.add(c);
    Collections.sort(num);
  
    for(int i = 0; i < num.length; i++){ 
      int sortnum = num.get(i); 
      System.out.println(sortnum + " ");
    }
  System.out.println();
  }
}

Compiler output:
Main.java:15: error: cannot find symbol
    for(int i = 0; i < num.length; i++){ 
                          ^
  symbol:   variable length
  location: variable num of type ArrayList<Integer>
1 error
Language: Java

import java.util.*;
      
class SortNum{
  public static void main(String [] args){
    Scanner scan = new Scanner(System.in);
    int a = Integer.parseInt(scan.next());
    int b = Integer.parseInt(scan.next());
    int c = Integer.parseInt(scan.next());
    ArrayList<Integer> num = new ArrayList<Integer>();
    num.add(a);
    num.add(b);
    num.add(c);
    Collections.sort(num);
   
    for(int i = 0; i < num.size; i++){ 
      int sortnum = num.get(i); 
      System.out.println(sortnum + " ");
    }
  System.out.println();
  }
}

Compiler output:
Main.java:15: error: size has private access in ArrayList
    for(int i = 0; i < num.size; i++){ 
                          ^
1 error
Language: Java

import java.util.*;
      
class SortNum{
	public static void main(String [] args){
		Scanner scan = new Scanner(System.in);
		int a = Integer.parseInt(scan.next());
		int b = Integer.parseInt(scan.next());
		int c = Integer.parseInt(scan.next());
		ArrayList<Integer> num = new ArrayList<Integer>();
		num.add(a);
		num.add(b);
		num.add(c);
		Collections.sort(num);
		int d = num.size();   
		for(int i = 0; i < d; i++){ 
			int sortnum = num.get(i); 
			System.out.print(sortnum);
			if (i < d-1){
				System.out.print(" ");
			} else break
		}
	}
}

Compiler output:
Main.java:20: error: ';' expected
			} else break
			            ^
1 error
Language: C

int main(void){
  int a,b,c,d,e,f;
  scanf("%d %d %d",&a,&b,&c);
  if( a <= b && b <= c )
  d=a,e=b,f=c;
  else if (a <= c && c <= b )
  d=a,e=c,f=b;
  else if (b <= a && a <= c )
  d=b,e=a,f=c;
  else if (b <= c && c <= a )
  d=b,e=c,f=a;
  else if (c <= a && a <= b )
  d=c,e=a,f=b;
  else //if (c <= b && b <= a )
  d=c,e=b,f=a;


  printf("%d %d %d\n",d,e,f);

return 0;


}

}


Compiler output:
main.c: In function 'main':
main.c:3:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    3 |   scanf("%d %d %d",&a,&b,&c);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(void){
main.c:3:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    3 |   scanf("%d %d %d",&a,&b,&c);
      |   ^~~~~
main.c:3:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:18:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   18 |   printf("%d %d %d\n",d,e,f);
      |   ^~~~~~
main.c:18:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:18:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:18:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c: At top level:
main.c:25:1: error: expected identifier or '(' before '}' token
   25 | }
      | ^
Language: C

#include<stdio.h>
int main(void){
  int a,b,c,d,e,f;
  scanf("%d %d %d",&a,&b,&c);
  if( a =< b && b =< c )
  d=a,e=b,f=c;
  else if (a =< c && c =< b )
  d=a,e=c,f=b;
  else if (b =< a && a =< c )
  d=b,e=a,f=c;
  else if (b =< c && c =< a )
  d=b,e=c,f=a;
  else if (c =< a && a =< b )
  d=c,e=a,f=b;
  else //if (c <= b && b <= a )
  d=c,e=b,f=a;


  printf("%d %d %d\n",d,e,f);

return 0;


}



Compiler output:
main.c: In function 'main':
main.c:5:10: error: expected expression before '<' token
    5 |   if( a =< b && b =< c )
      |          ^
main.c:7:15: error: expected expression before '<' token
    7 |   else if (a =< c && c =< b )
      |               ^
main.c:9:15: error: expected expression before '<' token
    9 |   else if (b =< a && a =< c )
      |               ^
main.c:11:15: error: expected expression before '<' token
   11 |   else if (b =< c && c =< a )
      |               ^
main.c:13:15: error: expected expression before '<' token
   13 |   else if (c =< a && a =< b )
      |               ^
Language: C

#include <stdio.h>

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

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

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


Compiler output:
main.c: In function 'main':
main.c:10:14: error: passing argument 1 of 'swap' makes pointer from integer without a cast [-Wint-conversion]
   10 |         swap(a, b);
      |              ^
      |              |
      |              int
main.c:3:16: note: expected 'int *' but argument is of type 'int'
    3 | void swap(int* a, int* b);
      |           ~~~~~^
main.c:10:17: error: passing argument 2 of 'swap' makes pointer from integer without a cast [-Wint-conversion]
   10 |         swap(a, b);
      |                 ^
      |                 |
      |                 int
main.c:3:24: note: expected 'int *' but argument is of type 'int'
    3 | void swap(int* a, int* b);
      |                   ~~~~~^
main.c:13:14: error: passing argument 1 of 'swap' makes pointer from integer without a cast [-Wint-conversion]
   13 |         swap(a, c);
      |              ^
      |              |
      |              int
main.c:3:16: note: expected 'int *' but argument is of type 'int'
    3 | void swap(int* a, int* b);
      |           ~~~~~^
main.c:13:17: error: passing argument 2 of 'swap' makes pointer from integer without a cast [-Wint-conversion]
   13 |         swap(a, c);
      |                 ^
      |                 |
      |                 int
main.c:3:24: note: expected 'int *' but argument is of type 'int'
    3 | void swap(int* a, int* b);
      |                   ~~~~~^
main.c:16:14: error: passing argument 1 of 'swap' makes pointer from integer without a cast [-Wint-conversion]
   16 |         swap(a, b);
      |              ^
      |              |
      |              int
main.c:3:16: note: expected 'int *' but argument is of type 'int'
    3 | void swap(int* a, int* b);
      |           ~~~~~^
main.c:16:17: error: passing argument 2 of 'swap' makes pointer from integer without a cast [-Wint-conversion]
   16 |         swap(a, b);
      |                 ^
      |                 |
      |                 int
main.c:3:24: note: expected 'int *' but argument is of type 'int'
    3 | void swap(int* a, int* b);
      |                   ~~~~~^
main.c: In function 'swap':
main.c:25:9: error: assignment to 'int' from 'int **' makes integer from pointer without a cast [-Wint-conversion]
   25 |     tmp = &a;
      |         ^
main.c:26:8: error: lvalue required as left operand of assignment
   26 |     &a = &b;
      |        ^
main.c:27:8: error: lvalue required as left operand of assignment
   27 |     &b = tmp;
      |        ^
Language: C

#include <stdio.h>

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

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

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


Compiler output:
main.c: In function 'main':
main.c:10:14: error: passing argument 1 of 'swap' makes pointer from integer without a cast [-Wint-conversion]
   10 |         swap(a, b);
      |              ^
      |              |
      |              int
main.c:3:16: note: expected 'int *' but argument is of type 'int'
    3 | void swap(int *a, int *b);
      |           ~~~~~^
main.c:10:17: error: passing argument 2 of 'swap' makes pointer from integer without a cast [-Wint-conversion]
   10 |         swap(a, b);
      |                 ^
      |                 |
      |                 int
main.c:3:24: note: expected 'int *' but argument is of type 'int'
    3 | void swap(int *a, int *b);
      |                   ~~~~~^
main.c:13:14: error: passing argument 1 of 'swap' makes pointer from integer without a cast [-Wint-conversion]
   13 |         swap(a, c);
      |              ^
      |              |
      |              int
main.c:3:16: note: expected 'int *' but argument is of type 'int'
    3 | void swap(int *a, int *b);
      |           ~~~~~^
main.c:13:17: error: passing argument 2 of 'swap' makes pointer from integer without a cast [-Wint-conversion]
   13 |         swap(a, c);
      |                 ^
      |                 |
      |                 int
main.c:3:24: note: expected 'int *' but argument is of type 'int'
    3 | void swap(int *a, int *b);
      |                   ~~~~~^
main.c:16:14: error: passing argument 1 of 'swap' makes pointer from integer without a cast [-Wint-conversion]
   16 |         swap(a, b);
      |              ^
      |              |
      |              int
main.c:3:16: note: expected 'int *' but argument is of type 'int'
    3 | void swap(int *a, int *b);
      |           ~~~~~^
main.c:16:17: error: passing argument 2 of 'swap' makes pointer from integer without a cast [-Wint-conversion]
   16 |         swap(a, b);
      |                 ^
      |                 |
      |                 int
main.c:3:24: note: expected 'int *' but argument is of type 'int'
    3 | void swap(int *a, int *b);
      |                   ~~~~~^
main.c: In function 'swap':
main.c:25:9: error: assignment to 'int' from 'int **' makes integer from pointer without a cast [-Wint-conversion]
   25 |     tmp = &a;
      |         ^
main.c:26:8: error: lvalue required as left operand of assignment
   26 |     &a = &b;
      |        ^
main.c:27:8: error: lvalue required as left operand of assignment
   27 |     &b = tmp;
      |        ^
Language: C

#include <stdio.h>

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

int main() {
    int a, b, c;
    
    scanf("%d %d %d", &a, &b, &c);
    if(a > b) swap(&a, &b);
    if(b > c) swap(&b, &c):
    if(a > b) swap(&a, &b);
    printf("%d %d %d", a, b, c);
    
    return 0;
}

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


Compiler output:
main.c: In function 'main':
main.c:10:27: error: expected ';' before ':' token
   10 |     if(b > c) swap(&b, &c):
      |                           ^
      |                           ;
Language: C

#include <stdio.h>
int main(void){
    int a,b,c;
    scanf("%d %d %d",&a,&b,&c);
    if(a<b){
        if(b<c){
        printf("%d %d %d\n",a,b,c);
    }
    else if(c<a){
        printf("%d %d %d\n",c,a,b);
    }
    else{
        printf("%d %d %d\n",a,c,b);
    }
    }
    else if(b<a){
         if(a<c){
            printf("%d %d %d\n",b,a,c);
         }
         else if(c<b){
            printf("%d %d %d\n",c,b,a);
         }
         else{
            printf("%d %d %d\n",b,c,a);
     }
    return 0;
}




Compiler output:
main.c: In function 'main':
main.c:27:1: error: expected declaration or statement at end of input
   27 | }
      | ^
Language: C

#include <stdio.h>
int main(void){
    int a,b,c;
    scanf("%d %d %d",&a,&b,&c);
    if(a<b){
        if(b<c){
            printf("%d %d %d\n",a,b,c);
        }
        else if(c<a){
            printf("%d %d %d\n",c,a,b);
        }
        else{
            printf("%d %d %d\n",a,c,b);
        }
    }
    else if(b<a){
        if(a<c){
            printf("%d %d %d\n",b,a,c);
        }
        else if(c<b){
            printf("%d %d %d\n",c,b,a);
        }
        else{
            printf("%d %d %d\n",b,c,a);
        }
return 0;
}
    
    




Compiler output:
main.c: In function 'main':
main.c:27:1: error: expected declaration or statement at end of input
   27 | }
      | ^
Language: C

#include<stdio.h>
int main(void)
{
    int a b c;
    scanf("%d %d %d",&a,&b,&c);
    a<b,a<c,b<c;
    printf("a<b<c\n");
    if(a>b){
        printf("b>a<c\n");
}
    else{
        printf("a<c<b\n");
}
    return 0;
}



Compiler output:
main.c: In function 'main':
main.c:4:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'b'
    4 |     int a b c;
      |           ^
main.c:4:11: error: unknown type name 'b'
main.c:5:23: error: 'a' undeclared (first use in this function)
    5 |     scanf("%d %d %d",&a,&b,&c);
      |                       ^
main.c:5:23: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:26: error: 'b' undeclared (first use in this function)
    5 |     scanf("%d %d %d",&a,&b,&c);
      |                          ^
Language: C

#include<stdio.h>
int main(void)
{
    int a b c;
    scanf("%d %d %d", &a, &b, &c);
    a<b,a<c,b<c;
    printf("a<b<c\n");
    if(a>b){
        printf("b>a<c\n");
}
    else{
        printf("a<c<b\n");
}
    return 0;
}



Compiler output:
main.c: In function 'main':
main.c:4:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'b'
    4 |     int a b c;
      |           ^
main.c:4:11: error: unknown type name 'b'
main.c:5:24: error: 'a' undeclared (first use in this function)
    5 |     scanf("%d %d %d", &a, &b, &c);
      |                        ^
main.c:5:24: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:28: error: 'b' undeclared (first use in this function)
    5 |     scanf("%d %d %d", &a, &b, &c);
      |                            ^
Language: C

#include<stdio.h>
int main(void)
{
    float a b c;
    scanf("%d %d %d", &a, &b, &c);
    a<b,a<c,b<c;
    printf("a<b<c\n");
    if(a>b){
        printf("b>a<c\n");
}
    else{
        printf("a<c<b\n");
}
    return 0;
}



Compiler output:
main.c: In function 'main':
main.c:4:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'b'
    4 |     float a b c;
      |             ^
main.c:4:13: error: unknown type name 'b'
main.c:5:24: error: 'a' undeclared (first use in this function)
    5 |     scanf("%d %d %d", &a, &b, &c);
      |                        ^
main.c:5:24: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:28: error: 'b' undeclared (first use in this function)
    5 |     scanf("%d %d %d", &a, &b, &c);
      |                            ^
Language: C

#include<stdio.h>
int main(void)
{
    int a c d;
    scanf("%d %d %d\n", &a, &c, &d);
    a<b,a<c,b<c;
    printf("a<b<c\n");
    if(a>b){
        printf("b<a<c\n");
}
    else{
        printf("a<c<b\n");
}
    return 0;
}



Compiler output:
main.c: In function 'main':
main.c:4:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'c'
    4 |     int a c d;
      |           ^
main.c:4:11: error: unknown type name 'c'
main.c:5:26: error: 'a' undeclared (first use in this function)
    5 |     scanf("%d %d %d\n", &a, &c, &d);
      |                          ^
main.c:5:26: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:30: error: 'c' undeclared (first use in this function)
    5 |     scanf("%d %d %d\n", &a, &c, &d);
      |                              ^
main.c:6:7: error: 'b' undeclared (first use in this function)
    6 |     a<b,a<c,b<c;
      |       ^
Language: C

#include<stdio.h>
int main(void)
{
    int a, c, d;
    scanf("%d %d %d\n", &a, &c, &d);
    a<b,a<c,b<c;
    printf("a<b<c\n");
    if(a>b){
        printf("b<a<c\n");
}
    else{
        printf("a<c<b\n");
}
    return 0;
}



Compiler output:
main.c: In function 'main':
main.c:6:7: error: 'b' undeclared (first use in this function)
    6 |     a<b,a<c,b<c;
      |       ^
main.c:6:7: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int main(void)
{
    int a, b, c;
    scanf("%d %d %d\n", &a, &b, &c);
    a<b,a<c,b<c;
    printf("a b c\n");
    if(a>b){
        printf("b a c\n");
}
    else if(b>c){
        printf("a c b\n");
}
    else{
　　　　printf("b c a\n");
    return 0;
}



Compiler output:
main.c: In function 'main':
main.c:15:1: error: stray '\343' in program
   15 | <U+3000><U+3000><U+3000><U+3000>printf("b c a\n");
      | ^~~~~~~~
main.c:15:3: error: stray '\343' in program
   15 | <U+3000><U+3000><U+3000><U+3000>printf("b c a\n");
      |         ^~~~~~~~
main.c:15:5: error: stray '\343' in program
   15 | <U+3000><U+3000><U+3000><U+3000>printf("b c a\n");
      |                 ^~~~~~~~
main.c:15:7: error: stray '\343' in program
   15 | <U+3000><U+3000><U+3000><U+3000>printf("b c a\n");
      |                         ^~~~~~~~
main.c:17:1: error: expected declaration or statement at end of input
   17 | }
      | ^
Language: C

#include<stdio.h>
int main(void)
{
    int a, b, c;
    scanf("%d %d %d\n", &a, &b, &c);
    a<b,a<c,b<c;
    printf("a b c\n");
    if(a>b){
        printf("b a c\n");
}
    else if(b>c){
        printf("a c b\n");
}
    else{
　　　　printf("b c a\n");
}
    return 0;
}



Compiler output:
main.c: In function 'main':
main.c:15:1: error: stray '\343' in program
   15 | <U+3000><U+3000><U+3000><U+3000>printf("b c a\n");
      | ^~~~~~~~
main.c:15:3: error: stray '\343' in program
   15 | <U+3000><U+3000><U+3000><U+3000>printf("b c a\n");
      |         ^~~~~~~~
main.c:15:5: error: stray '\343' in program
   15 | <U+3000><U+3000><U+3000><U+3000>printf("b c a\n");
      |                 ^~~~~~~~
main.c:15:7: error: stray '\343' in program
   15 | <U+3000><U+3000><U+3000><U+3000>printf("b c a\n");
      |                         ^~~~~~~~
Language: C

#include<stdio.h>
int main(void)
{
    int a, b, c;
    scanf("%d %d %d\n", &a, &b, &c);
    if(a<b&&a<c&&b<c){
        printf("a b c\n");
)
    if(a>b){
        printf("b a c\n");
}
    else if(b>c){
        printf("a c b\n");
}
    return 0;
}



Compiler output:
main.c: In function 'main':
main.c:8:1: error: expected statement before ')' token
    8 | )
      | ^
main.c:16:1: error: expected declaration or statement at end of input
   16 | }
      | ^
Language: C

#include<stdio.h>
int main(void)
{
    int a, b, c;
    scanf("%d %d %d\n", &a, &b, &c);
    if(a<b&&a<c&&b<c){
        printf("a b c\n");
}
    else if(a>b){
        printf("b a c\n");
}
    else if(b>c){
        printf("a c b\n");
}
    else if(a>b,a>c){
        printf("b c a\n");
}
    else if(a>c,b>c){
        printf("c a b\n");
}
    else{
        printf("c b a")
}
    return 0;
}



Compiler output:
main.c: In function 'main':
main.c:22:24: error: expected ';' before '}' token
   22 |         printf("c b a")
      |                        ^
      |                        ;
   23 | }
      | ~
Language: C

#include<stdio.h>
int main(void)
{
    int a b c;
    scanf("%d %d %d", &a, &b, &c);
    if(a<b&&a<c&&b<c){
        printf("a b c\n");
}
    else if(a>b){
        printf("b a c\n");
}
    else if(b>c){
        printf("a c b\n");
}
    else if(a>b,a>c){
        printf("b c a\n");
}
    else if(a>c,b>c){
        printf("c a b\n");
}
    else{
        printf("c b a");
}
    return 0;
}



Compiler output:
main.c: In function 'main':
main.c:4:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'b'
    4 |     int a b c;
      |           ^
main.c:4:11: error: unknown type name 'b'
main.c:5:24: error: 'a' undeclared (first use in this function)
    5 |     scanf("%d %d %d", &a, &b, &c);
      |                        ^
main.c:5:24: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:28: error: 'b' undeclared (first use in this function)
    5 |     scanf("%d %d %d", &a, &b, &c);
      |                            ^
Language: C

#include<stdio.h>
int main(void)
{
    int a, b, c;
    scanf("%d %d %d", &a &b &c);
    if(a<b&&a<c&&b<c){
        printf("a b c\n");
}
    else if(a>b){
        printf("b a c\n");
}
    else if(b>c){
        printf("a c b\n");
}
    else if(a>b&&a>c){
        printf("b c a\n");
}
    else if(a>c&&b>c){
        printf("c a b\n");
}
    else{
        printf("c b a");
}
    return 0;
}



Compiler output:
main.c: In function 'main':
main.c:5:26: error: invalid operands to binary & (have 'int *' and 'int')
    5 |     scanf("%d %d %d", &a &b &c);
      |                       ~~ ^
      |                       |
      |                       int *
Language: C

#include<stdio.h>
int main(void)
{
    int a, b, c;
    scanf("%d %d %d", &a, &b, &c);
    if(a<=b&&a<=c&&b<=c){
        printf("a b c\n");
}
    else if(a=>b){
        printf("b a c\n");
}
    else if(b>=c){
        printf("a c b\n");
}
    else if(a>=b&&a>=c){
        printf("b c a\n");
}
    else if(a>=c&&b>=c){
        printf("c a b\n");
}
    else{
        printf("c b a");
}
    return 0;
}



Compiler output:
main.c: In function 'main':
main.c:9:15: error: expected expression before '>' token
    9 |     else if(a=>b){
      |               ^
Language: C

#include <stdio.h>

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

  scanf ("%d%d%d",&a,&b,&c);

  if (a>b&&b>c)pritnf("%d %d %d\n",c,b,a);
  else if (a>b&&b<c&&a>c)printf ("%d %d %d\n",b,c,a);
  else if (a>b&&b<c&&a<c)printf ("%d %d %d\n",b,a,c);
  else if (a<b&&b>c&&a>c)printf ("%d %d %d\n",c,a,b);
  else if (a<b&&b>c&&a<c)printf ("%d %d %d\n",a,c,b);
  else printf ("%d%d%d\n",a,b,c);
  
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:16: error: implicit declaration of function 'pritnf'; did you mean 'printf'? [-Wimplicit-function-declaration]
    8 |   if (a>b&&b>c)pritnf("%d %d %d\n",c,b,a);
      |                ^~~~~~
      |                printf
Language: C

#include<stdio.h>

 void ex(int x,y){
      int tmp;
      if(x>y){
         tmp=x;
         x=y;
         y=tmp;
         }
      }

 int main(){
     int a,b,c;
     scanf("%d%d%d");
     ex(a,b);
     ex(b,c);
     ex(a,c);
     return 0;
     }


Compiler output:
main.c:3:16: error: unknown type name 'y'
    3 |  void ex(int x,y){
      |                ^
main.c: In function 'main':
main.c:15:6: error: implicit declaration of function 'ex' [-Wimplicit-function-declaration]
   15 |      ex(a,b);
      |      ^~
Language: C

#include<stdio.h>

 int main(){
     int a[3],i,j,tmp;
     scanf("%d%d%d",a[0],a[1],a[2]);
     for(i=0;i<2;i++){
          for(j=1;j<3;i++){
              if(a[j]<a[i]){
                   tmp=a[j];
                   a[j]=a[i];
                   a[i]=tmp;
                   }
     return 0;
     }


Compiler output:
main.c: In function 'main':
main.c:14:6: error: expected declaration or statement at end of input
   14 |      }
      |      ^
main.c:14:6: error: expected declaration or statement at end of input
Language: C

#include<stdio.h>

 int main(){
     int a[3],i,j,tmp;
     scanf("%d%d%d",&a[0],&a[1],&a[2]);
     for(i=0;i<2;i++){
          for(j=1;j<3;i++){
              if(a[j]<a[i]){
                   tmp=a[j];
                   a[j]=a[i];
                   a[i]=tmp;
                   }
     for(i=0;i<3;i++)printf(" %d",a[i]);
     printf("\n");
     return 0;
     }


Compiler output:
main.c: In function 'main':
main.c:16:6: error: expected declaration or statement at end of input
   16 |      }
      |      ^
main.c:16:6: error: expected declaration or statement at end of input
Language: C

#include<stdio.h>

 int main(){
     int a,b,c;
     scanf("%d%d%d",&a,&b,&c);
     if(a>b)tmp;tmp=a;a=b;b=tmp;
     if(b>c)tmp;tmp=b;b=c;c=tmp;
     if(a>b)tmp;tmp=a;a=b;b=tmp;

     printf("%d %d %d\n",a,b,c);
     return 0;
     }


Compiler output:
main.c: In function 'main':
main.c:6:13: error: 'tmp' undeclared (first use in this function)
    6 |      if(a>b)tmp;tmp=a;a=b;b=tmp;
      |             ^~~
main.c:6:13: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main(){

int a,b,c,x;

scanf"%d %d %d\n",&a,&b,&c);

if(a>b){
 x=a;
 a=b;
 b=x;
}

if(b>c){
 x=b;
 b=c;
 c=x;
}

if(a>b){
 x=a;
 a=b;
 b=x;
}

printf("%d %d %d\n",a,b,c);
return 0;
}

 



Compiler output:
main.c: In function 'main':
main.c:7:6: error: expected ';' before string constant
    7 | scanf"%d %d %d\n",&a,&b,&c);
      |      ^~~~~~~~~~~~
      |      ;
main.c:7:27: error: expected statement before ')' token
    7 | scanf"%d %d %d\n",&a,&b,&c);
      |                           ^
Language: C

#include <stdio.h>

int main(void)
{
    int a[3];
    int i, j;
    int tmp;

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

    for(i = 0; i < 2; i++){
        for(j = 0; j < 2, j++){
            if(a[i] > a[i + 1]){
                tmp = a[i];
                a[i] = a[i + 1];
                a[i + 1] = tmp;
            }
        }
    }

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

    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:14:30: error: expected ';' before ')' token
   14 |         for(j = 0; j < 2, j++){
      |                              ^
      |                              ;