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

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

public class Main{
    public static void main(String[] args) throws IOException{
    	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] array = new String[10];
        int[] heights = new int[10];
        for(int i=0; i<10; i++){
        	System.out.println("enter height: ");
        	array[i] = br.readLine();
        	heights[i] = Integer.parseInt(array[i]);
        }
        
        Arrays.sort(heights);
        for(int i=9; i>6; i--){
        	System.out.println(heights[i]);
        }
        
        
    }

}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.io.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.util.*;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: expected unqualified-id before 'public'
    4 | public class Main{
      | ^~~~~~
Language: C++

#include <iostream>
#include <cstdio>
#include <cstdlib>
using namespace std;

int main(){
	int hills[10];
	char string[256];
	fgets(string, 256, stdin);
	for (int i = 0; i < 10; i++){
		char* one;
		one = strtok(string, "\n");
		hills[i] = atoi(one);
	}
	int top[4] = {0};
	for (int i = 0; i < 10; i++){
		if (hills[i] > top[0]){
			top[3] = top[2];
			top[2] = top[1];
			top[1] = top[0];
			top[0] = hills[i];
		}else if (hills[i] > top[1]){
			top[3] = top[2];
			top[2] = top[1];
			top[1] = hills[i];
		}else if (hills[i] > top[2]){
			top[2] = top[1];
			top[1] = hills[i];
		}
	}
	fprintf(stdout, "%d\n%d\n%d",top[0],top[1],top[2]);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:23: error: 'strtok' was not declared in this scope; did you mean 'strtoq'?
   12 |                 one = strtok(string, "\n");
      |                       ^~~~~~
      |                       strtoq
Language: C++

#include<iostream.h>
#include<conio.h>

using namespace std;
int main()
{
int mountheight[10];
for(int i=0;i<10;i++)
{
cin>>mountheight[i];
}
int max[3];
max[0]=mountheight[0];
max[1]=mountheight[0];
max[2]=mountheight[0];
for(i=1;i<10;i++)
{
if(mountheight[i]>max[0])
{
max[0]=mountheight[i];
}
}
for(i=1;i<10;i++)
{
if(mountheight[i]>max[1]&&mountheight[i]!=max[0])
{
max[1]=mountheight[j];
}
}
for(i=1;i<10;i++)
{
if(mountheight[i]>max[2]&&mountheight[i]!=max[0]&&mountheight[i]!=max[1])
{
max[2]=mountheight[j];
}
}
cout<<max[0];
cout<<max[1];
cout<<max[2];
return 0;
}

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

#include<iostream>
#include<conio>

using namespace std;
void main()
{
clrscr();
int mount[10];
for(int i=0;i<10;i++)
{
cin >> mount[i];
}
int max[3];
max[0] = mount[0];
max[1] = mount[0];
max[2] = mount[0];
for(i=1;i<10;i++)
{
if(mount[i]>max[0])
{
max[0] = mount[i];
}
}
for(i=1;i<10;i++)
{
if(mount[i]>max[1]&&mount[i]!=max[0])
{
max[1] = mount[j];
}
}
for(i=1;i<10;i++)
{
if(mount[i]>max[2]&&mount[i]!=max[0]&&mount[i]!=max[1])
{
max[2] = mount[j];
}
}
cout << max[0] << endl;
cout << max[1] << endl;
cout << max[2] <<endl;
getch();
}
}

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

#include<iostream>

using namespace std;
int main()
{
int mount[10];
for(int i=0;i<10;i++)
{
cin >> mount[i];
}
int max[3];
max[0] = mount[0];
max[1] = mount[0];
max[2] = mount[0];
for(i=1;i<10;i++)
{
if(mount[i]>max[0])
{
max[0] = mount[i];
}
}
for(i=1;i<10;i++)
{
if(mount[i]>max[1]&&mount[i]!=max[0])
{
max[1] = mount[i];
}
}
for(i=1;i<10;i++)
{
if(mount[i]>max[2]&&mount[i]!=max[0]&&mount[i]!=max[1])
{
max[2] = mount[i];
}
}
cout << max[0] << endl;
cout << max[1] << endl;
cout << max[2] <<endl;
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:5: error: 'i' was not declared in this scope
   15 | for(i=1;i<10;i++)
      |     ^
a.cc:22:5: error: 'i' was not declared in this scope
   22 | for(i=1;i<10;i++)
      |     ^
a.cc:29:5: error: 'i' was not declared in this scope
   29 | for(i=1;i<10;i++)
      |     ^
a.cc: At global scope:
a.cc:40:1: error: expected unqualified-id before 'return'
   40 | return 0;
      | ^~~~~~
a.cc:41:1: error: expected declaration before '}' token
   41 | }
      | ^
Language: C++

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

#include<vector>
#include<algorithm>

using namespace std;
int main()
{
	vector<int> vec;
	int temp;
	for (int i = 0; i < 10; i++)
	{
		cin >> temp;
		vec.push_back(temp);
	}
	make_heap(vec.begin(), vec.end());
	for (int i = 0; i < 3; i ++ )
	{
		cout << vec.front()<<endl;
		pop_heap(vec.begin(), vec.end());
		vec.pop_back();
	}
}

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

#include <iostream> using namespace std; int main() { int i=0; int num[10]; for(;i<10;i++) cin>>num[i]; int temp=0,temp1=0,j=0,k=0; for(;j<3;j++) { for(i=0;i<10;i++) { temp1=temp; temp=temp<num[i]?num[i]:temp; if(temp>temp1) k=i; } cout<<num[k]<<endl; temp=0; num[k]=0; } return 0; }

Compiler output:
a.cc:1:21: warning: extra tokens at end of #include directive
    1 | #include <iostream> using namespace std; int main() { int i=0; int num[10]; for(;i<10;i++) cin>>num[i]; int temp=0,temp1=0,j=0,k=0; for(;j<3;j++) { for(i=0;i<10;i++) { temp1=temp; temp=temp<num[i]?num[i]:temp; if(temp>temp1) k=i; } cout<<num[k]<<endl; temp=0; num[k]=0; } return 0; }
      |                     ^~~~~
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

inputs = []

10.times do
  inputs << gets.to_i
end

puts inputs.sort.reverse[0..2]

Compiler output:
a.cc:7:26: error: too many decimal points in number
    7 | puts inputs.sort.reverse[0..2]
      |                          ^~~~
a.cc:1:1: error: 'inputs' does not name a type
    1 | inputs = []
      | ^~~~~~
Language: C++

#include <iostream>
using namespace std;

int main()
{
	int x[10];
	int i,j,tmp;
	for(i=0;i<10;i++){
		cin >> x[i];
	}
	for(i=0;i<n-1;i++){
		for(j=n-1;j>i;j--){
			if(x[j]<x[j-1]){
				tmp = x[j];
				x[j] = x[j-1];
				x[j-1] = x[j];
			}
		}
	}
	cout <<x[0] <<endl;
	cout <<x[1] <<endl;
	cout <<x[2] <<endl;
		
		
	for(i=1;i<=9;i++){
		for(j=1;j<=9;j++){
			cout << i << "x" << j <<"=" <<i*j <<endl;
		}
	}
	
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:19: error: 'n' was not declared in this scope
   11 |         for(i=0;i<n-1;i++){
      |                   ^
Language: C++

#include <iostream>
using namespace std;

int main()
{
	int x[10];
	int i,j,tmp;
	for(i=0;i<10;i++){
		cin >> x[i];
	}
	for(i=0;i<n-1;i++){
		for(j=n-1;j>i;j--){
			if(x[j]<x[j-1]){
				tmp = x[j];
				x[j] = x[j-1];
				x[j-1] = x[j];
			}
		}
	}
	cout <<x[0] <<endl;
	cout <<x[1] <<endl;
	cout <<x[2] <<endl;
		
		
		
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:19: error: 'n' was not declared in this scope
   11 |         for(i=0;i<n-1;i++){
      |                   ^
Language: C++

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

int main()
{
	int x[10];
	int i,j,tmp;
	for(i=0;i<10;i++){
		cin >> x[i];
	}
	
	sort(x);
	
	cout <<x[9] <<endl;
	cout <<x[8] <<endl;
	cout <<x[7] <<endl;
		
		
		
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:13: error: no matching function for call to 'sort(int [10])'
   13 |         sort(x);
      |         ~~~~^~~
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_algo.h:4762:5: note: candidate: 'template<class _RAIter> void std::sort(_RAIter, _RAIter)'
 4762 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:4762:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algo.h:4793:5: note: candidate: 'template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare)'
 4793 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:4793:5: note:   candidate expects 3 arguments, 1 provided
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator, class _Compare> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _Compare)'
  292 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp);
      | ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note:   candidate expects 4 arguments, 1 provided
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator)'
  296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
      | ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note:   candidate expects 3 arguments, 1 provided
Language: C++

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

int main()
{
    int in;
    vector<int> v;
    while(cin >> in)
    {
        v.push_back(in);
    }
    sort(v.begin(), v.end(), greater<int>());
    for(int i = 0; i < 3 : i++)
    {
        cout << v[i] << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:20: warning: range-based 'for' loops with initializer only available with '-std=c++20' or '-std=gnu++20' [-Wc++20-extensions]
   15 |     for(int i = 0; i < 3 : i++)
      |                    ^
a.cc:15:25: error: expected ';' before ':' token
   15 |     for(int i = 0; i < 3 : i++)
      |                         ^~
      |                         ;
a.cc:19:1: error: expected primary-expression before '}' token
   19 | }
      | ^
a.cc:18:6: error: expected ';' before '}' token
   18 |     }
      |      ^
      |      ;
   19 | }
      | ~     
a.cc:19:1: error: expected primary-expression before '}' token
   19 | }
      | ^
a.cc:18:6: error: expected ')' before '}' token
   18 |     }
      |      ^
      |      )
   19 | }
      | ~     
a.cc:15:8: note: to match this '('
   15 |     for(int i = 0; i < 3 : i++)
      |        ^
a.cc:19:1: error: expected primary-expression before '}' token
   19 | }
      | ^
Language: C++

#include <iostream>
#include <vector>
using namespace std;

int main() {
  std::cin.tie(0);
  std::ios::sync_with_stdio(false);

  int i, input;
  vector<int> heights;
  for (i = 0; i < 10; i++) {
    cin >> input;
    heights.push_back(input);
  }

  sort(heights.rbegin(), heights.rend());
  cout << heights.at(0) << endl;
  cout << heights.at(1) << endl;
  cout << heights.at(2) << endl;

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   16 |   sort(heights.rbegin(), heights.rend());
      |   ^~~~
      |   short
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
vector<int> height;
int a;
while(cin>>a){
height.push_back(a);
}
sort(height.begin(). height.end(), greater<int>());
for(int i = 0; i < 3; i++)
cout << height[i] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:22: error: 'std::vector<int>::iterator' has no member named 'height'
   11 | sort(height.begin(). height.end(), greater<int>());
      |                      ^~~~~~
Language: C++

import sys
a = []
s = sys.stdin.readline()
while s :
	a.append(int(s))
	s = sys.stdin.readline()

a.sort()
a.reverse()
for i in range(3) :
	print(a[i]);

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import sys
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

#include<iostream>
using namespace std;
 
int main(){
 
    int height[10];
    int TopOfThree[3];

    for(i = 0;i < 10;i++)
       cin >> height[i];

    for(int i = 0;i < 3;i++)
    {
        TopOfThree[i] = height[0];
        for(int j = 1;j < 10 - i;i++)
        {
             int index = 0;

             if(TopOfThree[i] < height[j])
             {
                  TopOfThree[i] = height[j];
                  index = j;
             }
        }

        for(int k = index;k < 10;k++)
        {
            if(k == 9)
              height[k] = 0;
           else
              height[k] = height[k + 1];
        }
     }

     cout << TopOfThree[0] << endl << TopOfThree[1] << endl << TopOfThree[2] << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'i' was not declared in this scope
    9 |     for(i = 0;i < 10;i++)
      |         ^
a.cc:26:21: error: 'index' was not declared in this scope
   26 |         for(int k = index;k < 10;k++)
      |                     ^~~~~
Language: C++

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

class Main{
    public static void main(String args[]){
        int[] h = new int[10];
        Scanner scan = new Scanner(System.in);
        for(int i = 0; i < 10; i++){
            h[i] = Integer.parseInt(scan.next());
        }
        Arrays.sort(h);
        System.out.println(h[9]);
        System.out.println(h[8]);
        System.out.println(h[7]);
    }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.util.Arrays;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:11: error: expected ':' before 'static'
    5 |     public static void main(String args[]){
      |           ^~~~~~~
      |           :
a.cc:5:29: error: 'String' has not been declared
    5 |     public static void main(String args[]){
      |                             ^~~~~~
a.cc:16:2: error: expected ';' after class definition
   16 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:6:12: error: structured binding declaration cannot have type 'int'
    6 |         int[] h = new int[10];
      |            ^~
a.cc:6:12: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:6:12: error: empty structured binding declaration
a.cc:6:15: error: expected initializer before 'h'
    6 |         int[] h = new int[10];
      |               ^
a.cc:7:9: error: 'Scanner' was not declared in this scope
    7 |         Scanner scan = new Scanner(System.in);
      |         ^~~~~~~
a.cc:9:13: error: 'h' was not declared in this scope
    9 |             h[i] = Integer.parseInt(scan.next());
      |             ^
a.cc:9:20: error: 'Integer' was not declared in this scope
    9 |             h[i] = Integer.parseInt(scan.next());
      |                    ^~~~~~~
a.cc:9:37: error: 'scan' was not declared in this scope
    9 |             h[i] = Integer.parseInt(scan.next());
      |                                     ^~~~
a.cc:11:9: error: 'Arrays' was not declared in this scope
   11 |         Arrays.sort(h);
      |         ^~~~~~
a.cc:11:21: error: 'h' was not declared in this scope
   11 |         Arrays.sort(h);
      |                     ^
a.cc:12:9: error: 'System' was not declared in this scope
   12 |         System.out.println(h[9]);
      |         ^~~~~~
Language: C++

#include <iostream>
#include <vector>
#include <utility>
#include <algorithm>
using namespace std;

int main(){
  vector<int> h(10);

  for(int i=0;i<10;++i) cin>>h[i];

  sort(begin(v),end(v),greater<int>());

  for(int i=0;i<3;++i) cout<<h[i]<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:14: error: 'v' was not declared in this scope
   12 |   sort(begin(v),end(v),greater<int>());
      |              ^
Language: C++

#include<algorithm>a[10],imain(){    for(;i<10;scanf("%d",a+i++)); sort(a,a+10);for(;i>7;printf("%d\n",a+--i));return 0;}

Compiler output:
a.cc:1:21: warning: extra tokens at end of #include directive
    1 | #include<algorithm>a[10],imain(){    for(;i<10;scanf("%d",a+i++)); sort(a,a+10);for(;i>7;printf("%d\n",a+--i));return 0;}
      |                     ^
a.cc:1:9: fatal error: algorithm>: No such file or directory
    1 | #include<algorithm>a[10],imain(){    for(;i<10;scanf("%d",a+i++)); sort(a,a+10);for(;i>7;printf("%d\n",a+--i));return 0;}
      |         ^~~~~~~~~~~~
compilation terminated.
Language: C++

#include<algorithm>a[10],i;main(){    for(;i<10;scanf("%d",a+i++)); sort(a,a+10);for(;i>7;printf("%d\n",a+--i));return 0;}

Compiler output:
a.cc:1:21: warning: extra tokens at end of #include directive
    1 | #include<algorithm>a[10],i;main(){    for(;i<10;scanf("%d",a+i++)); sort(a,a+10);for(;i>7;printf("%d\n",a+--i));return 0;}
      |                     ^
a.cc:1:9: fatal error: algorithm>: No such file or directory
    1 | #include<algorithm>a[10],i;main(){    for(;i<10;scanf("%d",a+i++)); sort(a,a+10);for(;i>7;printf("%d\n",a+--i));return 0;}
      |         ^~~~~~~~~~~~
compilation terminated.
Language: C++

#include<algorithm>a[10],imain(){    for(;i<10;scanf("%d",a+i++)); sort(a,a+10);for(;i>7;printf("%d\n",a+(--i)));return 0;}

Compiler output:
a.cc:1:21: warning: extra tokens at end of #include directive
    1 | #include<algorithm>a[10],imain(){    for(;i<10;scanf("%d",a+i++)); sort(a,a+10);for(;i>7;printf("%d\n",a+(--i)));return 0;}
      |                     ^
a.cc:1:9: fatal error: algorithm>: No such file or directory
    1 | #include<algorithm>a[10],imain(){    for(;i<10;scanf("%d",a+i++)); sort(a,a+10);for(;i>7;printf("%d\n",a+(--i)));return 0;}
      |         ^~~~~~~~~~~~
compilation terminated.
Language: C++


class q2
{
	public static void main(String[] av)
	{
		java.util.Scanner sc = new java.util.Scanner(System.in);
		java.util.ArrayList<Integer> vec = new java.util.ArrayList<Integer>();
		while( sc.hasNextInt() )
		{
			vec.add( sc.nextInt() );	
		}
		java.util.Collections.sort( vec );
		java.util.Collections.reverse( vec );
		for ( int i = 0; i < 3; ++i )
		{
			System.out.println( vec.get(i) );
		}
	}
}

Compiler output:
a.cc:4:15: error: expected ':' before 'static'
    4 |         public static void main(String[] av)
      |               ^~~~~~~
      |               :
a.cc:4:33: error: 'String' has not been declared
    4 |         public static void main(String[] av)
      |                                 ^~~~~~
a.cc:4:42: error: expected ',' or '...' before 'av'
    4 |         public static void main(String[] av)
      |                                          ^~
a.cc:19:2: error: expected ';' after class definition
   19 | }
      |  ^
      |  ;
a.cc: In static member function 'static void q2::main(int*)':
a.cc:6:17: error: 'java' was not declared in this scope
    6 |                 java.util.Scanner sc = new java.util.Scanner(System.in);
      |                 ^~~~
a.cc:7:37: error: 'Integer' was not declared in this scope
    7 |                 java.util.ArrayList<Integer> vec = new java.util.ArrayList<Integer>();
      |                                     ^~~~~~~
a.cc:7:46: error: 'vec' was not declared in this scope
    7 |                 java.util.ArrayList<Integer> vec = new java.util.ArrayList<Integer>();
      |                                              ^~~
a.cc:7:56: error: 'java' does not name a type
    7 |                 java.util.ArrayList<Integer> vec = new java.util.ArrayList<Integer>();
      |                                                        ^~~~
a.cc:8:24: error: 'sc' was not declared in this scope
    8 |                 while( sc.hasNextInt() )
      |                        ^~
a.cc:16:25: error: 'System' was not declared in this scope
   16 |                         System.out.println( vec.get(i) );
      |                         ^~~~~~
Language: C++


class Main
{
	public static void main(String[] av)
	{
		java.util.Scanner sc = new java.util.Scanner(System.in);
		java.util.ArrayList<Integer> vec = new java.util.ArrayList<Integer>();
		while( sc.hasNextInt() )
		{
			vec.add( sc.nextInt() );	
		}
		java.util.Collections.sort( vec );
		java.util.Collections.reverse( vec );
		for ( int i = 0; i < 3; ++i )
		{
			System.out.println( vec.get(i) );
		}
	}
}

Compiler output:
a.cc:4:15: error: expected ':' before 'static'
    4 |         public static void main(String[] av)
      |               ^~~~~~~
      |               :
a.cc:4:33: error: 'String' has not been declared
    4 |         public static void main(String[] av)
      |                                 ^~~~~~
a.cc:4:42: error: expected ',' or '...' before 'av'
    4 |         public static void main(String[] av)
      |                                          ^~
a.cc:19:2: error: expected ';' after class definition
   19 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:6:17: error: 'java' was not declared in this scope
    6 |                 java.util.Scanner sc = new java.util.Scanner(System.in);
      |                 ^~~~
a.cc:7:37: error: 'Integer' was not declared in this scope
    7 |                 java.util.ArrayList<Integer> vec = new java.util.ArrayList<Integer>();
      |                                     ^~~~~~~
a.cc:7:46: error: 'vec' was not declared in this scope
    7 |                 java.util.ArrayList<Integer> vec = new java.util.ArrayList<Integer>();
      |                                              ^~~
a.cc:7:56: error: 'java' does not name a type
    7 |                 java.util.ArrayList<Integer> vec = new java.util.ArrayList<Integer>();
      |                                                        ^~~~
a.cc:8:24: error: 'sc' was not declared in this scope
    8 |                 while( sc.hasNextInt() )
      |                        ^~
a.cc:16:25: error: 'System' was not declared in this scope
   16 |                         System.out.println( vec.get(i) );
      |                         ^~~~~~
Language: C++

#include <iostream>
#include <array>
#include <utility>

template<class T>
T input()
{
	T val;
	std::cin >> val;
	return val;
}

int main()
{
	std::array<int, 10> high;
	for (int i = 0; i < 10; ++i)
		high[i] = input<int>();

	std::sort(high.begin(), high.end());

	std::cout << high[9] << " " << high[8] << " " << high[7] << std::endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:14: error: 'sort' is not a member of 'std'; did you mean 'qsort'?
   19 |         std::sort(high.begin(), high.end());
      |              ^~~~
      |              qsort
Language: C++

#include <iostream>
#include <array>
#include <utility>

int main()
{
	std::array<int, 10> high;
	for (int i = 0; i < 10; ++i)
		std::cin >> high[i];

	std::sort(high.begin(), high.end());

	std::cout << high[9] << " " << high[8] << " " << high[7] << std::endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:14: error: 'sort' is not a member of 'std'; did you mean 'qsort'?
   11 |         std::sort(high.begin(), high.end());
      |              ^~~~
      |              qsort
Language: C++

#include<stdio.h>
#include<algorithm.h>

using namespace std;

int main(){

 int i, height[10];
 for(i=0;i<10;i++){
  scanf("%d", &height[i]);
 }
 sort(height, height+10, greater<int>());

 for(i=0;i<2;i++){
  printf("%d\n", height[i]);
 }

 return 0;
}

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

#include<stdio.h>
#include<algorithm>

using namespace std;
 
int main(){
 
 int i, height[10];
 for(i=0;i<10;i++){
  scanf("%d", &height[i]);
 }
 sort(height, height+10, greater<int>());
 
 for(i=0;i<2;i++){
  printf("%d\n", height[i]);
 }
 
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:26: error: 'greater' was not declared in this scope
   12 |  sort(height, height+10, greater<int>());
      |                          ^~~~~~~
a.cc:12:34: error: expected primary-expression before 'int'
   12 |  sort(height, height+10, greater<int>());
      |                                  ^~~
Language: C++

#include<iostream>
using namespace std;

int main(){
    int hest[3];
    for(int i=0,int h=0;i<10;i++){
        std::cin>>h;
        for(int j=0;j<3;j++){
            if(hest[i]<h){
                hest[i] = h;
            }
        }
    }

    for(int j=0;j<3;j++){
        std::cout<<hest[i]<<std::endl;
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:17: error: expected unqualified-id before 'int'
    6 |     for(int i=0,int h=0;i<10;i++){
      |                 ^~~
a.cc:6:17: error: expected ';' before 'int'
    6 |     for(int i=0,int h=0;i<10;i++){
      |                 ^~~
      |                 ;
a.cc:6:29: error: expected ')' before ';' token
    6 |     for(int i=0,int h=0;i<10;i++){
      |        ~                    ^
      |                             )
a.cc:6:30: error: 'i' was not declared in this scope
    6 |     for(int i=0,int h=0;i<10;i++){
      |                              ^
Language: C++

#include<iostream>
using namespace std;

int main(){
    int hest[3];
    int h;
    for(int i=0;i<10;i++){
        std::cin>>h;
        for(int j=0;j<3;j++){
            if(hest[i]<h){
                hest[i] = h;
            }
        }
    }

    for(int j=0;j<3;j++){
        std::cout<<hest[i]<<std::endl;
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:25: error: 'i' was not declared in this scope
   17 |         std::cout<<hest[i]<<std::endl;
      |                         ^
Language: C++

#include<iostream>
using namespace std;

int main(){
    int hest[3]={0,0,0};
    int h;
    for(int i=0;i<10;i++){
        std::cin>>h;
        for(int j=0;j<3;j++){
            if(hest[j]<h){
                hest[j] = h;
            }
        }
    }

    for(int j=0;j<3;j++){
        std::cout<<hest[i]<<std::endl;
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:25: error: 'i' was not declared in this scope
   17 |         std::cout<<hest[i]<<std::endl;
      |                         ^
Language: C++

#include <stdio.h>

int main(void) {
	int n;
	n=0;
	
	if (n<0 && n>10000)
	{
		return 1;
	}
	
	for(n=0; n<10 ;n++)
	{
		printf("height of mountain %d\n", %n);
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:51: error: expected primary-expression before '%' token
   14 |                 printf("height of mountain %d\n", %n);
      |                                                   ^
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;
    
int main(){
	int data,m[10];

	while(cin >> data)
	{
		for (int j=0;j<=9;j++){
			
			if (data<=10000 && data >= 0) 
			m[j]=data;
		}


for (int j=0;j<=9;j++){
for (int i=0;i<=9;i++){

	if (m[i] <= m[i+1])
		std::swap(m[i],m[i+1]);

}
}
 
for (int i=0;i<=9;i++){
cout <<  m[i] <<'\n';
}

    return 0;
}

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

#include <iostream>

int main() {
  int heights[16] = { 0 };
  int temp_result = 0;
  int index = 12;

  for(int i = 0; i < 10; i++) {
    std::cin >> heights[i];
  }

  for(int j = 0; j < 3; j++) {
    heights[index] = 0;
    index = 0;
    temp_result = 0;
    for(int i = 0; i < 10 i++) {
      if(temp_result < heights[i]) {
        temp_result = heights[i];
        index = i;
      }
    }
    std::cout << temp_result << std::endl;
  }


  return 0;
}








    

Compiler output:
a.cc: In function 'int main()':
a.cc:16:26: error: expected ';' before 'i'
   16 |     for(int i = 0; i < 10 i++) {
      |                          ^~
      |                          ;
Language: C++

#Include <iostream>
using namespace std;

const static int MAX = 10000;

int main() {
int R[MAX]={0};
int i;

for (int i=0; i < 10; i++ ) {
cin >> i;
R[i]=i;
}

for (int j=MAX - 1; j>0 ; j--){
int cnt = 0;

if  (cnt <= 3) break;

if (R[j] != 0){
cout << R[i] << endl;
cnt++;
}
return 0;
}



}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #Include; did you mean #include?
    1 | #Include <iostream>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:11:1: error: 'cin' was not declared in this scope
   11 | cin >> i;
      | ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #Include <iostream>
a.cc:21:1: error: 'cout' was not declared in this scope
   21 | cout << R[i] << endl;
      | ^~~~
a.cc:21:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:21:17: error: 'endl' was not declared in this scope
   21 | cout << R[i] << endl;
      |                 ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #Include <iostream>
Language: C++

#include<iostream>

using namespace std;

int main()
{
	int high[10] = { };
	int first = 0, second = 0, third = 0;
	
	for(int i = 0; i < 10; i++){
		cin >> high[i];
		
		if(first <= high[i]){
			second = first;
			third = econd;
			first = high[i];
		}
		else if(second <= high[i]){
			third = second;
			second = high[i];
		}
		else if(third <= high[i])
			third = high[i];
	}
	
	cout << first << endl << second << endl << third << endl;
	
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:33: error: 'econd' was not declared in this scope; did you mean 'second'?
   15 |                         third = econd;
      |                                 ^~~~~
      |                                 second
Language: C++

#include<iostream>
using namespace std;
int main(){
    int work[10];
    int temp;
    for(int i = 0; i < 10; i++){
        cin >> work[i];
    }
    for(int i = 0; i < 9; i++){
        for(j = i + 1; j < 10; j++){
            if(work[i] < work[j]){
                temp = work[i];
                work[i] = work[j];
                work[j] = temp;
            }
        }
    }
    for(int i = 0; i < 3; i++){
        cout << work[i] << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: 'j' was not declared in this scope
   10 |         for(j = i + 1; j < 10; j++){
      |             ^
Language: C++

#include<iostream>
using namespace std;
int main(){
    int work[10];
    int temp;
    for(int i = 0; i < 10; i++){
        cin >> work[i];
    }
    for(int i = 0; i < 9; i++){
        for(j = i + 1; j < 9; j++){
            if(work[i] < work[j]){
                temp = work[i];
                work[i] = work[j];
                work[j] = temp;
            }
        }
    }
    for(int i = 0; i < 3; i++){
        cout << work[i] << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: 'j' was not declared in this scope
   10 |         for(j = i + 1; j < 9; j++){
      |             ^
Language: C++

#include<iostream>
using namespace std;
int main(){
    int work[10];
    int temp;
    for(int i = 0; i < 10; i++){
        cin >> work[i];
    }
    for(int i = 0; i < 9; i++){
        for(j = i + 1; j <= 9; j++){
            if(work[i] < work[j]){
                temp = work[i];
                work[i] = work[j];
                work[j] = temp;
            }
        }
    }
    for(int i = 0; i < 3; i++){
        cout << work[i] << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: 'j' was not declared in this scope
   10 |         for(j = i + 1; j <= 9; j++){
      |             ^
Language: C++

#include <iostream>

using namespace std;

int main(void)
{
	int input[10];

	for(int i = 0; i < 10; i++){
		cin >> input[i];
	}


	for(int i = 3; i < 10; i++){
		for(int j = 0; j < 3; j++){
			if(input[i] > input[j]){
				input[j] = input[i];
				break;
			}
		}
	}

	sort(input, input+2);

	for(int i = 0; i < 3; i++){
		cout << input[i] << endl;
	}


	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   23 |         sort(input, input+2);
      |         ^~~~
      |         short
Language: C++

#include <iostream>

using namespace std;

int main(void)
{
	int input[10];

	for(int i = 0; i < 10; i++){
		cin >> input[i];
	}


	for(int i = 3; i < 10; i++){
		for(int j = 0; j < 3; j++){
			if(input[i] > input[j]){
				input[j] = input[i];
				break;
			}
		}
	}

	sort(input, input+3, less<int>());

	for(int i = 0; i < 3; i++){
		cout << input[i] << endl;
	}


	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   23 |         sort(input, input+3, less<int>());
      |         ^~~~
      |         short
Language: C++

#include<iostream>
#include<vector>
using namespace std;

int main(int argc, char *argv[]){
  int n;
  vector<int> a;
  while(cin >> n){
    a.push_back(-n);
  }
  sort(a.begin(), a.end());
  std::cout << -a[0] << std::endl;
  std::cout << -a[1] << std::endl;
  std::cout << -a[2] << std::endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:11:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   11 |   sort(a.begin(), a.end());
      |   ^~~~
      |   short
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main() {
	vector<int> h(10);
	for (int i = 0; i < 10; ++i) cin >> h[i];

	sort( h.begin(), h.end(), greater<int> );

	cout << h[0] << endl;
	cout << h[1] << endl;
	cout << h[2] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:48: error: expected primary-expression before ')' token
   11 |         sort( h.begin(), h.end(), greater<int> );
      |                                                ^
Language: C++

# -*- config: utf-8 -*-
if __name__ == '__main__':
	hills = []
	for i in range(10):
		tmp = raw_input()
		hills.append(int(tmp))
	hills.sort(reverse=True)

	for i in range(3):
		print hills[i]

Compiler output:
a.cc:1:3: error: invalid preprocessing directive #-
    1 | # -*- config: utf-8 -*-
      |   ^
a.cc:2:16: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
    2 | if __name__ == '__main__':
      |                ^~~~~~~~~~
a.cc:2:1: error: expected unqualified-id before 'if'
    2 | if __name__ == '__main__':
      | ^~
Language: C++

#include <stdio.h>

int main(void)
{
	int i,h[10];
	for(i=0;i<10;i++){
		scanf("%d",&h[i]);
	}
	printf("%d",fir(h));
	printf("%d",sec(h));
	printf("%d",thi(h));
	return 0;
}

int fir(const int *h){
	int i,f=0;
	for(i=0;i<10;i++){
		f<h[i] ? f=h[i] : /*処理無し*/;
	}
	return f;
}

int sec(const int *h){
	int i,f,s;
	for(i=0;i<10;i++){
		f<h[i] ? f=h[i] : /*処理無し*/;
	}
	for(i=0;i<10;i++){
		f>=h[i] && s<h[i] ? s=h[i] : /*処理無し*/;
	}
	return s;
}

int thi(const int *h){
	int i,f,s,t;
	for(i=0;i<10;i++){
		f<h[i] ? f=h[i] : /*処理無し*/;
	}
	for(i=0;i<10;i++){
		f>=h[i] && s<h[i] ? s=h[i] : /*処理無し*/;
	}
	for(i=0;i<10;i++){
		s>=h[i] && t<h[i] ? t=h[i] : /*処理無し*/;
	}
	return t;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:21: error: 'fir' was not declared in this scope
    9 |         printf("%d",fir(h));
      |                     ^~~
a.cc:10:21: error: 'sec' was not declared in this scope
   10 |         printf("%d",sec(h));
      |                     ^~~
a.cc:11:21: error: 'thi' was not declared in this scope
   11 |         printf("%d",thi(h));
      |                     ^~~
a.cc: In function 'int fir(const int*)':
a.cc:18:47: error: expected primary-expression before ';' token
   18 |                 f<h[i] ? f=h[i] : /*処理無し*/;
      |                                               ^
a.cc: In function 'int sec(const int*)':
a.cc:26:47: error: expected primary-expression before ';' token
   26 |                 f<h[i] ? f=h[i] : /*処理無し*/;
      |                                               ^
a.cc:29:58: error: expected primary-expression before ';' token
   29 |                 f>=h[i] && s<h[i] ? s=h[i] : /*処理無し*/;
      |                                                          ^
a.cc: In function 'int thi(const int*)':
a.cc:37:47: error: expected primary-expression before ';' token
   37 |                 f<h[i] ? f=h[i] : /*処理無し*/;
      |                                               ^
a.cc:40:58: error: expected primary-expression before ';' token
   40 |                 f>=h[i] && s<h[i] ? s=h[i] : /*処理無し*/;
      |                                                          ^
a.cc:43:58: error: expected primary-expression before ';' token
   43 |                 s>=h[i] && t<h[i] ? t=h[i] : /*処理無し*/;
      |                                                          ^
Language: C++

#include <stdio.h>

int fir(const int*);
int sec(const int*);
int thi(const int*);

int main(void)
{
	int i,h[10];
	for(i=0;i<10;i++){
		scanf("%d",&h[i]);
	}
	printf("%d",fir(h));
	printf("%d",sec(h));
	printf("%d",thi(h));
	return 0;
}

int fir(const int *h){
	int i,f=0;
	for(i=0;i<10;i++){
		f<h[i] ? f=h[i] : /*処理無し*/;
	}
	return f;
}

int sec(const int *h){
	int i,f,s;
	for(i=0;i<10;i++){
		f<h[i] ? f=h[i] : /*処理無し*/;
	}
	for(i=0;i<10;i++){
		f>=h[i] && s<h[i] ? s=h[i] : /*処理無し*/;
	}
	return s;
}

int thi(const int *h){
	int i,f,s,t;
	for(i=0;i<10;i++){
		f<h[i] ? f=h[i] : /*処理無し*/;
	}
	for(i=0;i<10;i++){
		f>=h[i] && s<h[i] ? s=h[i] : /*処理無し*/;
	}
	for(i=0;i<10;i++){
		s>=h[i] && t<h[i] ? t=h[i] : /*処理無し*/;
	}
	return t;
}

Compiler output:
a.cc: In function 'int fir(const int*)':
a.cc:22:47: error: expected primary-expression before ';' token
   22 |                 f<h[i] ? f=h[i] : /*処理無し*/;
      |                                               ^
a.cc: In function 'int sec(const int*)':
a.cc:30:47: error: expected primary-expression before ';' token
   30 |                 f<h[i] ? f=h[i] : /*処理無し*/;
      |                                               ^
a.cc:33:58: error: expected primary-expression before ';' token
   33 |                 f>=h[i] && s<h[i] ? s=h[i] : /*処理無し*/;
      |                                                          ^
a.cc: In function 'int thi(const int*)':
a.cc:41:47: error: expected primary-expression before ';' token
   41 |                 f<h[i] ? f=h[i] : /*処理無し*/;
      |                                               ^
a.cc:44:58: error: expected primary-expression before ';' token
   44 |                 f>=h[i] && s<h[i] ? s=h[i] : /*処理無し*/;
      |                                                          ^
a.cc:47:58: error: expected primary-expression before ';' token
   47 |                 s>=h[i] && t<h[i] ? t=h[i] : /*処理無し*/;
      |                                                          ^
Language: C++

#include <stdio.h>

int fir(const int *);
int sec(const int *);
int thi(const int *);

int main(void)
{
	int i,h[10];
	for(i=0;i<10;i++){
		scanf("%d",&h[i]);
	}
	printf("%d",fir(h));
	printf("%d",sec(h));
	printf("%d",thi(h));
	return 0;
}

int fir(const int *h){
	int i,f=0;
	for(i=0;i<10;i++){
		f<h[i] ? f=h[i] : /*処理無し*/;
	}
	return f;
}

int sec(const int *h){
	int i,f,s;
	for(i=0;i<10;i++){
		f<h[i] ? f=h[i] : /*処理無し*/;
	}
	for(i=0;i<10;i++){
		f>=h[i] && s<h[i] ? s=h[i] : /*処理無し*/;
	}
	return s;
}

int thi(const int *h){
	int i,f,s,t;
	for(i=0;i<10;i++){
		f<h[i] ? f=h[i] : /*処理無し*/;
	}
	for(i=0;i<10;i++){
		f>=h[i] && s<h[i] ? s=h[i] : /*処理無し*/;
	}
	for(i=0;i<10;i++){
		s>=h[i] && t<h[i] ? t=h[i] : /*処理無し*/;
	}
	return t;
}

Compiler output:
a.cc: In function 'int fir(const int*)':
a.cc:22:47: error: expected primary-expression before ';' token
   22 |                 f<h[i] ? f=h[i] : /*処理無し*/;
      |                                               ^
a.cc: In function 'int sec(const int*)':
a.cc:30:47: error: expected primary-expression before ';' token
   30 |                 f<h[i] ? f=h[i] : /*処理無し*/;
      |                                               ^
a.cc:33:58: error: expected primary-expression before ';' token
   33 |                 f>=h[i] && s<h[i] ? s=h[i] : /*処理無し*/;
      |                                                          ^
a.cc: In function 'int thi(const int*)':
a.cc:41:47: error: expected primary-expression before ';' token
   41 |                 f<h[i] ? f=h[i] : /*処理無し*/;
      |                                               ^
a.cc:44:58: error: expected primary-expression before ';' token
   44 |                 f>=h[i] && s<h[i] ? s=h[i] : /*処理無し*/;
      |                                                          ^
a.cc:47:58: error: expected primary-expression before ';' token
   47 |                 s>=h[i] && t<h[i] ? t=h[i] : /*処理無し*/;
      |                                                          ^
Language: C++

#include <iostream>
using namespace std;
int main(){
	int m[10];
	for(int i=0;i<10;i++) cin >> m[i];
	while(1){
		bool j = true;
		for(int i=0;i<9;i++){
			if(m[i]<m[i+1]){
				int t = m[i];
				m[i] = m[i+1];
				m[i+1] = t;
				j = false;
			}
		}
		if(J) break;
	}
	for(int i=0;i<3;i++) cout << m[i] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:20: error: 'J' was not declared in this scope
   16 |                 if(J) break;
      |                    ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:4:13: error: conflicting declaration 'int a [10]'
    4 |         int a[10];
      |             ^
a.cc:3:13: note: previous declaration as 'int a'
    3 |         int a,i,j;
      |             ^
a.cc:6:30: error: invalid types 'int[int]' for array subscript
    6 |                 scanf("%d",&a[i]);
      |                              ^
a.cc:10:37: error: invalid types 'int[int]' for array subscript
   10 |                                 if(a[j]<a[j+1]){
      |                                     ^
a.cc:10:42: error: invalid types 'int[int]' for array subscript
   10 |                                 if(a[j]<a[j+1]){
      |                                          ^
a.cc:11:52: error: invalid types 'int[int]' for array subscript
   11 |                                         int temp =a[j];
      |                                                    ^
a.cc:12:42: error: invalid types 'int[int]' for array subscript
   12 |                                         a[j]=a[j+1];
      |                                          ^
a.cc:12:47: error: invalid types 'int[int]' for array subscript
   12 |                                         a[j]=a[j+1];
      |                                               ^
a.cc:13:42: error: invalid types 'int[int]' for array subscript
   13 |                                         a[j+1]=temp;
      |                                          ^
a.cc:18:64: error: invalid types 'int[int]' for array subscript
   18 |                                                 printf("%d\n",a[i]);
      |                                                                ^
a.cc:20:58: error: expected '}' at end of input
   20 |                                                 return 0;
      |                                                          ^
a.cc:2:11: note: to match this '{'
    2 | int main(){
      |           ^
Language: C++

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

					

Compiler output:
a.cc: In function 'int main()':
a.cc:4:13: error: conflicting declaration 'int a [10]'
    4 |         int a[10];
      |             ^
a.cc:3:13: note: previous declaration as 'int a'
    3 |         int a;
      |             ^
a.cc:8:30: error: invalid types 'int[int]' for array subscript
    8 |                 scanf("%d",&a[i]);
      |                              ^
a.cc:12:37: error: invalid types 'int[int]' for array subscript
   12 |                                 if(a[j]<a[j+1]){
      |                                     ^
a.cc:12:42: error: invalid types 'int[int]' for array subscript
   12 |                                 if(a[j]<a[j+1]){
      |                                          ^
a.cc:13:52: error: invalid types 'int[int]' for array subscript
   13 |                                         int temp =a[j];
      |                                                    ^
a.cc:14:42: error: invalid types 'int[int]' for array subscript
   14 |                                         a[j]=a[j+1];
      |                                          ^
a.cc:14:47: error: invalid types 'int[int]' for array subscript
   14 |                                         a[j]=a[j+1];
      |                                               ^
a.cc:15:42: error: invalid types 'int[int]' for array subscript
   15 |                                         a[j+1]=temp;
      |                                          ^
a.cc:20:64: error: invalid types 'int[int]' for array subscript
   20 |                                                 printf("%d\n",a[i]);
      |                                                                ^
a.cc:22:58: error: expected '}' at end of input
   22 |                                                 return 0;
      |                                                          ^
a.cc:2:11: note: to match this '{'
    2 | int main(){
      |           ^