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

#include <stdio.h>
void swap(int &a,int &b){
	int t;
	t=a;
	a=b;
	b=t;
}
//void swap(int &a,int &b);
int main(){
	int i,data[10];
	for(i=0;i<10;i++) scanf("%d",&data[i]);
	for(i=0;i<3;i++){
		for(int j=i+1;j<10;j++) if(data[j]>=data[i]) swap(data[i],data[j]);
	}
	printf("%d\n%d\n%d\n",data[0],data[1],data[2]);
	return 0;
}

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

Compiler output:
main.c:2:15: error: expected ';', ',' or ')' before '&' token
    2 | void swap(int &a,int &b){
      |               ^
main.c: In function 'main':
main.c:13:62: error: implicit declaration of function 'swap' [-Wimplicit-function-declaration]
   13 |                 for(int j=i+1;j<10;j++) if(data[j]>=data[i]) swap(data[i],data[j]);
      |                                                              ^~~~
main.c: At top level:
main.c:19:15: error: expected ';', ',' or ')' before '&' token
   19 | void swap(int &a,int &b){
      |               ^
Language: C

#include <stdio.h>
void swap(int *a,int *b){
	int t;
	t=*a;
	*a=*b;
	*b=t;
}
//void swap(int &a,int &b);
int main(){
	int i,data[10];
	for(i=0;i<10;i++) scanf("%d",&data[i]);
	for(i=0;i<3;i++){
		for(int j=i+1;j<10;j++) if(data[j]>=data[i]) swap(data[i],data[j]);
	}
	printf("%d\n%d\n%d\n",data[0],data[1],data[2]);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:71: error: passing argument 1 of 'swap' makes pointer from integer without a cast [-Wint-conversion]
   13 |                 for(int j=i+1;j<10;j++) if(data[j]>=data[i]) swap(data[i],data[j]);
      |                                                                   ~~~~^~~
      |                                                                       |
      |                                                                       int
main.c:2:16: note: expected 'int *' but argument is of type 'int'
    2 | void swap(int *a,int *b){
      |           ~~~~~^
main.c:13:79: error: passing argument 2 of 'swap' makes pointer from integer without a cast [-Wint-conversion]
   13 |                 for(int j=i+1;j<10;j++) if(data[j]>=data[i]) swap(data[i],data[j]);
      |                                                                           ~~~~^~~
      |                                                                               |
      |                                                                               int
main.c:2:23: note: expected 'int *' but argument is of type 'int'
    2 | void swap(int *a,int *b){
      |                  ~~~~~^
Language: C

#include<stdio.h>
int main(){

int a,max1=0,max2=0,max3=0,i;
for(i=0;i<10;i++){
	scanf("%d",&a);
	else if(max1<a){
		max3=max2;
		max2=max1;
		max1=a;
	}
	else if(max2<a){
		max3=max2;
		max2=a;
	}
	else if(max3<a)
	max3=a;
	}
	printf("%d\n%d\n%d\n",max1,max2,max3);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:9: error: 'else' without a previous 'if'
    7 |         else if(max1<a){
      |         ^~~~
Language: C

#include<stdio.h>
int main()
{
    int i,x,a=-1,b=-1,c=-1;
    for(i=1;i<=10;i++)
    {
        scanf("%d",&x);
        if(x>a)
        {
            c=b;
            b=a;
            a=x;
        }
        else if(x>b)
        {
            c=b;
            b=x;
        }
        else if(x>c)
            c=x;
    }
    printf("%d\n%d\n%d\n",a,b,c)
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:22:33: error: expected ';' before 'return'
   22 |     printf("%d\n%d\n%d\n",a,b,c)
      |                                 ^
      |                                 ;
   23 |     return 0;
      |     ~~~~~~
Language: C

/*
 * Author:  chlxyd
 * Created Time:  2013/8/15 13:05:07
 * File Name: 1006.cpp
 */
#include<iostream>
#include<sstream>
#include<fstream>
#include<vector>
#include<list>
#include<deque>
#include<queue>
#include<stack>
#include<map>
#include<set>
#include<bitset>
#include<algorithm>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cctype>
#include<cmath>
#include<ctime>
using namespace std;
const double eps(1e-8);
typedef long long lint;
#define clr(x) memset( x , 0 , sizeof(x) )
#define sz(v) ((int)(v).size())
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define repf(i, a, b) for (int i = (a); i <= (b); ++i)
#define repd(i, a, b) for (int i = (a); i >= (b); --i)
#define clrs( x , y ) memset( x , y , sizeof(x) )
char s[2][1100] ;
int dp[2][1100] ;
int f[2][1100] ;
char str[1100] ;
int n , T ;
void did( int k ) {
    int len = strlen(s[k]) ;
    int l = strlen(str) ;
    repf( i , 1 , l ) dp[k][l] = -1 ;
    dp[k][0] = 0 ;
    clrs(f[k],-1) ;
    rep( i , len ) {
        repd( j , l - 1 , 1 )
            if ( dp[k][j-1] != -1 && s[k][i] == str[j] ) {
                dp[k][j] = max( dp[k][j] , dp[k][j-1] ) ;
                if ( j == 1 ) dp[k][j] = i ;
                if ( j == l - 1 ) {
                    f[k][i] = dp[k][1] ;
                }
            }
    }
    rep( i , len ) 
        cout<<f[k][i]<<" ";
    cout<<endl;
}
int main(){
    scanf("%d" , &T ) ;
    repf( t , 1 , T ) {
        scanf("%s %s %s" , s[0] , s[1] , str ) ;
        repf( i , 0 , 1 ) did(i);
        //didup() ; diddown() ;
        //printf("Case #%d: %d\n", t , solve() ) ;
    }
}

Compiler output:
main.c:6:9: fatal error: iostream: No such file or directory
    6 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.
Language: C

#include <stdio.h>

int main(){
int i,a[10],b[3],f;
for(i=0;i<10;i++){
scanf("%d",&a[i]);
}
for(i=0;i<10;i++){
if(max2>max1 && max1<a[i]){
b[0]=a[i];
continue;
}
if(max3>max2 && max2<a[i]){
b[1]=a[i];
continue;
}
if(max3<a[i]){
b[2]=a[i];
continue;
}
}
for(i=0;i<2;i++){
if(b[i]<b[i+1]){
f=b[i];
b[i]=b[i+1];
b[i+1]=f;
}
}
if(b[0]<b[1]){
f=b[0];
b[0]=b[1];
b[1]=f;
}
printf("%d\n%d\n%d\n",b[0],b[1],b[2]);

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:4: error: 'max2' undeclared (first use in this function)
    9 | if(max2>max1 && max1<a[i]){
      |    ^~~~
main.c:9:4: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:9: error: 'max1' undeclared (first use in this function)
    9 | if(max2>max1 && max1<a[i]){
      |         ^~~~
main.c:13:4: error: 'max3' undeclared (first use in this function)
   13 | if(max3>max2 && max2<a[i]){
      |    ^~~~
Language: C

#include<stdio.h>
#include<stlib.h>

int main(){
    int n[10],a;
    for (int f=0;f<10;f++){
        scanf("%d",&n[f]);
    }
    for(int f1=0;f1<10;f1++){
        for(int f2=0;f2<10;f2++){
            a=max(a,max(n[f1],n[f2]));
           }
      }
    printf("%d",a);
    return 0;
}

Compiler output:
main.c:2:9: fatal error: stlib.h: No such file or directory
    2 | #include<stlib.h>
      |         ^~~~~~~~~
compilation terminated.
Language: C

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

int main(){
    int n[10],a;
    for (int f=0;f<10;f++){
        scanf("%d",&n[f]);
    }
    for(int f1=0;f1<10;f1++){
        for(int f2=0;f2<10;f2++){
            a=max(a,max(n[f1],n[f2]));
           }
      }
    printf("%d",a);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:15: error: implicit declaration of function 'max' [-Wimplicit-function-declaration]
   11 |             a=max(a,max(n[f1],n[f2]));
      |               ^~~
Language: C

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

int main(){
    int n[10],a,f,f1,f2;
    for (f=0;f<10;f++){
        scanf("%d",&n[f]);
    }
    for(f1=0;f1<10;f1++){
        for(f2=0;f2<10;f2++){
            a=max(a,max(n[f1],n[f2]));
           }
      }
    printf("%d",a);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:15: error: implicit declaration of function 'max' [-Wimplicit-function-declaration]
   11 |             a=max(a,max(n[f1],n[f2]));
      |               ^~~
Language: C

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

int main(void){
    int n[10]=0,a,f,f1,f2;
    for (f=0;f<10;f++){
        scanf("%d",&n[f]);
    }
    for(f1=0;f1<10;f1++){
        for(f2=0;f2<10;f2++){
            a=max(a,max(n[f1],n[f2]));
           }
      }
    printf("%d",a);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:15: error: invalid initializer
    5 |     int n[10]=0,a,f,f1,f2;
      |               ^
main.c:11:15: error: implicit declaration of function 'max' [-Wimplicit-function-declaration]
   11 |             a=max(a,max(n[f1],n[f2]));
      |               ^~~
Language: C

#include <stdio.h>
int main(){
    int n,height,top[3];
    for(n=1;n<=10;n++){
        scanf("%d",&height);
        if(top[0]<height){
            top[2]=top[1];
            top[1]=top[0];
            top[0]=height;
        }
        else if(top[1]<height){
            top[2]=top[1];
            top[1]=height;
        }
        else if(top[2]<height){
            top[2]=height;
        }
    }
    for(n=0;n<3;n++)
        printf("%d\n",top[n]);
    }
    return 0;
}

Compiler output:
main.c:22:5: error: expected identifier or '(' before 'return'
   22 |     return 0;
      |     ^~~~~~
main.c:23:1: error: expected identifier or '(' before '}' token
   23 | }
      | ^
Language: C

#include <iostream>
#include <cstdlib>
#include <cstdio>
#include <string>
#include <cmath>
#include <algorithm>
using namespace std;

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

	sort(h,h+10);

	cout<<h[9]<<endl<<h[8]<<endl<<h[7];

}

Compiler output:
main.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: C

console.log('Hello World');

a

a

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    1 | console.log('Hello World');
      |        ^
main.c:1:13: warning: multi-character literal with 11 characters exceeds 'int' size of 4 bytes
    1 | console.log('Hello World');
      |             ^~~~~~~~~~~~~
main.c:3:1: error: unknown type name 'a'
    3 | a
      | ^
main.c:5:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input
    5 | a
      | ^
Language: C

#include <stdio.h>

int main(){
	int x[10],i,j,max[3];
	
	for(i=0; i<10; i++){
		scanf("%d",&x[i]);
	}

	max[0]=x[0];

	for(i=0; i<10; i++){
		if(x[i]>max[0]){
			max[0]=x[i];
		}
	}

	if(max[1]==x[0]){
		max[1]=x[1];
	} else [
		max[1]=x[0]
	}

	for(i=0; i<10; i++){
		if((x[i]>max[1]) && (x[i]<max[0])){
			max[1]=x[i];
		}
	}

	if(max[2]==x[0]){
		max[2]=x[1];
	} else [
		max[2]=x[0]
	}

	for(i=0; i<10; i++){
		if((x[i]>max[2]) && (x[i]<max[1])){
			max[2]=x[i];
		}
	}

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

	return 0;

}

Compiler output:
main.c: In function 'main':
main.c:20:16: error: expected expression before '[' token
   20 |         } else [
      |                ^
main.c:21:28: error: expected ';' before '}' token
   21 |                 max[1]=x[0]
      |                            ^
      |                            ;
   22 |         }
      |         ~                   
main.c: At top level:
main.c:24:9: error: expected identifier or '(' before 'for'
   24 |         for(i=0; i<10; i++){
      |         ^~~
main.c:24:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   24 |         for(i=0; i<10; i++){
      |                   ^
main.c:24:25: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
   24 |         for(i=0; i<10; i++){
      |                         ^~
main.c:30:9: error: expected identifier or '(' before 'if'
   30 |         if(max[2]==x[0]){
      |         ^~
main.c:32:11: error: expected identifier or '(' before 'else'
   32 |         } else [
      |           ^~~~
main.c:36:9: error: expected identifier or '(' before 'for'
   36 |         for(i=0; i<10; i++){
      |         ^~~
main.c:36:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   36 |         for(i=0; i<10; i++){
      |                   ^
main.c:36:25: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
   36 |         for(i=0; i<10; i++){
      |                         ^~
main.c:42:9: error: expected identifier or '(' before 'for'
   42 |         for(i=0; i<3; i++){
      |         ^~~
main.c:42:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   42 |         for(i=0; i<3; i++){
      |                   ^
main.c:42:24: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
   42 |         for(i=0; i<3; i++){
      |                        ^~
main.c:46:9: error: expected identifier or '(' before 'return'
   46 |         return 0;
      |         ^~~~~~
main.c:48:1: error: expected identifier or '(' before '}' token
   48 | }
      | ^
Language: C

#include <stdio.h>

int main(){
	int x[10],i,j,max[3];
	
	for(i=0; i<10; i++){
		scanf("%d",&x[i]);
	}

	max[0]=x[0];

	for(i=0; i<10; i++){
		if(x[i]>max[0]){
			max[0]=x[i];
		}
	}

	if(max[1]==x[0]){
		max[1]=x[1];
	} else {
		max[1]=x[0]
	}

	for(i=0; i<10; i++){
		if((x[i]>max[1]) && (x[i]<max[0])){
			max[1]=x[i];
		}
	}

	if(max[2]==x[0]){
		max[2]=x[1];
	} else {
		max[2]=x[0]
	}

	for(i=0; i<10; i++){
		if((x[i]>max[2]) && (x[i]<max[1])){
			max[2]=x[i];
		}
	}

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

	return 0;

}

Compiler output:
main.c: In function 'main':
main.c:21:28: error: expected ';' before '}' token
   21 |                 max[1]=x[0]
      |                            ^
      |                            ;
   22 |         }
      |         ~                   
main.c:33:28: error: expected ';' before '}' token
   33 |                 max[2]=x[0]
      |                            ^
      |                            ;
   34 |         }
      |         ~
Language: C

#include<stdio.h>
#include<conio.h>
int main()
{
	int a[100],i,mountain1,mountain2,mountain3;
	for(i=0;i<10;i++)
	{
		scanf("%d",&a[i]);
	}
	mountain1=a[0];
	for(i=1;i<10;i++)
	{
		if(mountain1<a[i])
		{
			mountain1=a[i];
		}
	}
	mountain2=0;
	for(i=0;i<10;i++)
	{
		if(a[i]<mountain1)
		{
		    if(a[i]>mountain2)
            mountain2=a[i];
		}
	}
	mountain3=0;
	for(i=0;i<10;i++)
    {
        if(mountain1>a[i] && mountain2>a[i])
        {
            if(a[i]>mountain3)
                mountain3=a[i];
        }
    }
	printf("\n%d\n%d\n%d\n",mountain1,mountain2,mountain3);
	getch();
	return 0;
}

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

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

int main()
 {

  long long int s,d,t,n=0;
   long long int i[15];
  for(s=0;s<=9;s++)
   {
	scanf("%lld,",&i[s]);
   }

	 for(d=0;d<=9;d++)
	 {
	  for(s=0;s<=9;s++)
	   {
		if(i[d]<i[s])
		 {
		  t=i[s];
		  i[s]=i[d];
		  i[d]=t;
		 }
		}
	   }
   for(s=9;s>=7;s--)
   {
	 printf("%lld\n",i[s]);
	}
 return 0;
 }

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

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

int main()
 {

  long long int s,d,t,n=0;
   long long int i[15];
  for(s=0;s<=9;s++)
   {
	scanf("%lld,",&i[s]);
   }

	 for(d=0;d<=9;d++)
	 {
	  for(s=0;s<=9;s++)
	   {
		if(i[d]<i[s])
		 {
		  t=i[s];
		  i[s]=i[d];
		  i[d]=t;
		 }
		}
	   }
   for(s=9;s>=8;s--)
   {
	 printf("%lld\n",i[s]);

	}
	if(s==7){
        printf("%lld",i[7]);
	 }
 return 0;
 }

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

#include <Stdio.h>

int max_of_array(int vc[], int n, int *num, int *num2) {
    int i;
    int max;

    
    max = vc[0];
    
    for(i = 0; i < n; i++) {
        if((vc[i] > max) && (vc[i] != *num && vc[i] != *num2)) {
            max = vc[i];
        }
        
    }
    
    return(max);
}

int main(void) {
    int moutain[10] = {0};
    int i;
    int n = -1, n1 = -1, n2 = -1;
    
    for(i = 0; i < 10; i++) {
        if(moutain[i] < 0 || moutain[i] > 10000)
            break;
        scanf("%d", &moutain[i]);
    }
    
    printf("%d\n", max_of_array(moutain, 10, &n, &n));
    n1 = max_of_array(moutain, 10, &n, &n);
    printf("n1 = %d\n", n1);
    printf("%d\n", max_of_array(moutain, 10, &n1, &n1));
    n2 = max_of_array(moutain, 10, &n1, &n1);
    printf("n2 = %d\n", n2);
    printf("%d\n", max_of_array(moutain, 10, &n2, &n1));
    
    return(0);
}

Compiler output:
main.c:1:10: fatal error: Stdio.h: No such file or directory
    1 | #include <Stdio.h>
      |          ^~~~~~~~~
compilation terminated.
Language: C

#include <Stdio.h>

int max_of_array(int vc[], int n, int *num, int *num2) {
    int i;
    int max;

    
    max = vc[0];
    
    for(i = 0; i < n; i++) {
        if((vc[i] > max) && (vc[i] != *num && vc[i] != *num2)) {
            max = vc[i];
        }
        
    }
    
    return(max);
}

int main(void) {
    int moutain[10] = {0};
    int i;
    int n = -1, n1 = -1, n2 = -1;
    
    for(i = 0; i < 10; i++) {
        if(moutain[i] < 0 || moutain[i] > 10000)
            break;
        scanf("%d", &moutain[i]);
    }
    
    printf("%d\n", max_of_array(moutain, 10, &n, &n));
    n1 = max_of_array(moutain, 10, &n, &n);
    printf("%d\n", max_of_array(moutain, 10, &n1, &n1));
    n2 = max_of_array(moutain, 10, &n1, &n1);
    printf("%d\n", max_of_array(moutain, 10, &n2, &n1));
    
    return(0);
}

Compiler output:
main.c:1:10: fatal error: Stdio.h: No such file or directory
    1 | #include <Stdio.h>
      |          ^~~~~~~~~
compilation terminated.
Language: C

#include <stdio.h>
#include <string.h>
int main(void)
{
	int i,j,temp,input_int,rank[3] = {0};
	char input[5];
	char* p;

	for (i = 0; i < 10; i++) {
		fgets(input, sizeof(input),stdin);
		p = strchr(input,'\n');
		if (p != NULL) *p = '\0';
		sscanf_s(input,"%d",&input_int);
		for(j = 0; j < 3; j++)
		{
			if (rank[j] < input_int)
			{
				temp = rank[j];
				rank[j] = input_int;
				input_int = temp;
			}
		}
	}
	for (i = 0; i < 3; i++) {
    printf("data[%d] = %d\n", i, rank[i]);
    }
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:17: error: implicit declaration of function 'sscanf_s'; did you mean 'sscanf'? [-Wimplicit-function-declaration]
   13 |                 sscanf_s(input,"%d",&input_int);
      |                 ^~~~~~~~
      |                 sscanf
Language: C

#include <stdio.h>
int main(){
    int i,m,m1,m2,m3;
    for(i=0;i<10;i++){
        scanf("%d",&m);
        if(i==0){
            m1=m;
        }
        else if(i==1){
            if(m>m1){
                m2=m1;
                m1=m;
            }
            else{
                m2=m;
            }
        }
        else if(i==2){
            if(m>m2){
                if(m>m1){
                    m3=m2;
                    m2=m1;
                    m1=m;
                }
                else{
                    m3=m2;
                    m2=m;
                }
            }
            else{
                m3=m;
            }
        }
        else{
            if(m>m3){
                if(m>m2){
                    if(m>m1){
                        m3=m2;
                        m2=m1;
                        m1=m;
                    }
                    else{
                        m3=m2;
                        m2=m;
                    }
                }
                else{
                    m3=m;
                }
            }
        }
    }
    printf("%d\n%d\n%d\n",m1,m2,m3);
    return 0;

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

#include<stdio.h>

int main(void)
{
	int i,j,k;
	int mountain[10];
	int top[3];
	for(i=0;i<3;i++){
		top[i]=0;
	}
	for(i=0;i<10;i++){
		printf("山の高さ%d(整数):",i+1);
		scanf("%d",&mountain[i]);
		if(0<=mountain[i]||mountain[i]<=10000)
	}
	for(i=0;i<10;i++){
		for(j=0;j<3;j++){
			if(top[j]<mountain[i]){
				if(j==0){
					top[2]=top[1];
					top[1]=top[0];
					top[0]=mountain[i];
					j=3;
				}
				else if(j==1){
					top[2]=top[1];
					top[1]=mountain[i];
					j=3;
				}
				else if(j==2){
					top[2]=mountain[i];
					j=3;
				}
			}
		}
	}
	for(i=0;i<3;i++){
		printf("%d\n",top[i]);
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:15:9: error: expected expression before '}' token
   15 |         }
      |         ^
Language: C

#include <stdio.h> 
int main(void)
{
    unsigned int n,s,v;
    unsigned int mountains[10];
    for(n=0;n<10;n++)
        scanf("%u",&mountains[n]);
    for(s=1;s<=3;s++)
    {
        for(n=0;n<10;n++)
           v=v<mountains[n]?mountains[n]:v;
        printf("%u\n",v);
        for(n=0;n<10;n++)
            mountains[n]=v==mountains[n]?0:mountains[0];
    }
    return 0;[
}

Compiler output:
main.c: In function 'main':
main.c:16:14: error: expected expression before '[' token
   16 |     return 0;[
      |              ^
main.c:16:15: error: expected ';' before '}' token
   16 |     return 0;[
      |               ^
      |               ;
   17 | }
      | ~
Language: C

#include<stdio.h>



int main()
{

	int i,j,high[10],higher[3],flag=1,escape;

	for(i=0;i<10;i++)
	{
		scanf("%d",&high[i]);
	}
	
	
	higher[0] = high[0];
	higher[1] = high[1];
	higher[2] = high[2];

	while(flag)
	{
		for(i=0;i<2;i++)
		{
			if(higher[i]<higher[i+1])
			{
				escape[0] = higher[i];
				higher[i] = higher[i+1];
				higher[i+1] = escape;
			}
		}
		
		if(higher[0] >= higher[1] && higher[1] >= higher[2])
		{
			flag = 0;
		}
	}
	
				
	for(i=3;i<10;i++)
	{
		for(j=0;j<3;j++)
		{
			if(higher[j]<high[i])
			{
				if(j=0)
				{
					escape = higher[j];
					higher[j] = high[i];
					higher[j+2] = higher[j+1];
					higher[j+1] = escape;
				}
				
				else if(j=1)
				{
					escape = higher[j];
					higher[j] = high[i];
					higher[j+1] = escape;
				}
				
				else
				{
					higher[j] = high[i];
				}
			}
		}
	}


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


return 0;

}

Compiler output:
main.c: In function 'main':
main.c:26:39: error: subscripted value is neither array nor pointer nor vector
   26 |                                 escape[0] = higher[i];
      |                                       ^
Language: C

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



int main()
{

	int i,j,high[10],higher[3],flag=1,escape;

	for(i=0;i<10;i++)
	{
		scanf("%d",&high[i]);
	}
	
	
	higher[0] = high[0];
	higher[1] = high[1];
	higher[2] = high[2];

	while(flag)
	{
		for(i=0;i<2;i++)
		{
			if(higher[i]<higher[i+1])
			{
				escape[0] = higher[i];
				higher[i] = higher[i+1];
				higher[i+1] = escape;
			}
		}
		
		if(higher[0] >= higher[1] && higher[1] >= higher[2])
		{
			flag = 0;
		}
	}
	
				
	for(i=3;i<10;i++)
	{
		for(j=0;j<3;j++)
		{
			if(higher[j]<high[i])
			{
				if(j=0)
				{
					escape = higher[j];
					higher[j] = high[i];
					higher[j+2] = higher[j+1];
					higher[j+1] = escape;
				}
				
				else if(j=1)
				{
					escape = higher[j];
					higher[j] = high[i];
					higher[j+1] = escape;
				}
				
				else
				{
					higher[j] = high[i];
				}
			}
		}
	}


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


return 0;

}

Compiler output:
main.c: In function 'main':
main.c:27:39: error: subscripted value is neither array nor pointer nor vector
   27 |                                 escape[0] = higher[i];
      |                                       ^
Language: C

int top3(int a[])
{
	int i,j,k;
	
	for(i=10;i>7;i--)
	{
		for(j=i;j>1;j--)
		{
			if(a[j]<a[j-1])
			{
				k=a[j];
				a[j]=a[j-1];
				a[j-1]=k;
			}
		}
	}
	return a[];
}

Compiler output:
main.c: In function 'top3':
main.c:17:18: error: expected expression before ']' token
   17 |         return a[];
      |                  ^
Language: C

#include<stdio.h>
#define N 10

int main()
{
    int i, j, n, a=0;
    int A[N];

    for(i=0;i<10;i++){
        scanf("%d", &n);
        A[i] = n;
    }
    for(i=0;i<3;i++){
        n = 0;
        for(j=i1;j<N;j++){
            if(n<A[j] && 0<=A[j] && A[j]<=10000){
                n = A[j];
                a = j;//max_index
            }
        }
        n = A[i];
        A[i] = A[a];
        A[a] = n;
        printf("%d\n",A[i]);
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:15:15: error: 'i1' undeclared (first use in this function); did you mean 'i'?
   15 |         for(j=i1;j<N;j++){
      |               ^~
      |               i
main.c:15:15: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

using namespace std;
int main()
{
    int a[1000],i,j,k;
    for(i=0;i<10;i++)
        scanf("%d",&a[i]);
    sort(a,a+i);
    reverse(a,a+i);
    for(i=0;i<3;i++)
        printf("%d\n",a[i]);
return 0;
}

Compiler output:
main.c:3:10: fatal error: algorithm: No such file or directory
    3 | #include <algorithm>
      |          ^~~~~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>

int main(){
	int i,j,height[10]rank[3],backup;
	for(i=0;i<10;i++){
		scanf("%d",height[i]);
	}
	for(j=0;j<10;j++){
		for(i=0;i<9;i++){
				if(height[i]>height[i+1]){
				backup=height[i];
				height[i]=height[i+1];
				height[i+1]=backup;
			}
		}
	}
	for(i=0;i<3;i++){
		rank[i]=height[9-i];
		printf("%d\n",rank[i]);
	}
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:27: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'rank'
    4 |         int i,j,height[10]rank[3],backup;
      |                           ^~~~
main.c:6:28: error: 'height' undeclared (first use in this function)
    6 |                 scanf("%d",height[i]);
      |                            ^~~~~~
main.c:6:28: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:33: error: 'backup' undeclared (first use in this function)
   11 |                                 backup=height[i];
      |                                 ^~~~~~
main.c:18:17: error: 'rank' undeclared (first use in this function)
   18 |                 rank[i]=height[9-i];
      |                 ^~~~
Language: C

#include <iostream>
using namespace std;
int main(int argc, const char * argv[]) {
    int mountain[10] = {0};
    int i, k, index;
    int height = 0;
    for (i = 0; i < 10; i++) {
        cin >> mountain[i];
    }
    for (i = 0; i < 3; i++) {
        height = 0;
        for (k = 0; k < 10; k++) {
            if (height < mountain[k]) {
                height = mountain[k];
                index = k;
            }
        }
        cout << height <<endl;
        mountain[index] = 0;
    }
}

Compiler output:
main.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: C

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

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

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

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

import java.util.Scanner;
public class Main{
	public static void main(String[] args){
		Scanner input = new Scanner(System.in);
		int first = 0;
		int second = 0;
		int third = 0;
		for(int i=0;i<10;i++){
			int current = input.nextInt();
			if (current>third)
				if(current>second){
					if(current>first){
						third = second;
						second = first;
						first = current;
					}
					else{
						third=second;
						second = current;
					}
				}
				else third=current;

		}
		System.out.printf("%d\n%d\n%d", first, second, third);
	}
}

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

http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0001

Compiler output:
main.c:1:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
    1 | http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0001
      |     ^
Language: C

int main(){
	int mcount=0;
	int mbest3[4]={0,0,0,0};
	while(scanf("[\n]%d",&mbest3[3])){
		int ccount=0;
		do{
			int i=0;
			for(;i<3;i++){}
			if(mbest3[i]>mbest[i+1]){
				mbest3[i]+=mbest[i+1];
				mbest3[i+1]=mbest3[i]-mbest3[i+1];
				mbest3[i]-=mbest3[i];
			}
		}while(ccount==0);
	}
	int i=0;
	for(;i<3;i++){
		printf("%d\n",mbest3[i]);
	}
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:15: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    4 |         while(scanf("[\n]%d",&mbest3[3])){
      |               ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(){
main.c:4:15: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    4 |         while(scanf("[\n]%d",&mbest3[3])){
      |               ^~~~~
main.c:4:15: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:9:38: error: 'mbest' undeclared (first use in this function); did you mean 'mbest3'?
    9 |                         if(mbest3[i]>mbest[i+1]){
      |                                      ^~~~~
      |                                      mbest3
main.c:9:38: note: each undeclared identifier is reported only once for each function it appears in
main.c:18:17: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   18 |                 printf("%d\n",mbest3[i]);
      |                 ^~~~~~
main.c:18:17: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:18:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:18:17: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include<iostream>
#include<algorithm>

using namespace std;

int main()
{
    int arr[11];
    while(cin>>arr[0])
    {
        for(int i=1;i<10;i++)
        {
            cin>>arr[i];
        }
        sort(arr,arr+10);
        cout<<arr[9]<<endl;
        cout<<arr[8]<<endl;
        cout<<arr[7]<<endl;
    }
    return 0;
}

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

#include<stdio.h>

int main(){
  int i;
  int a[10];
  for(i=0;i<10;i++) scanf("%d",&a[i]);
  int f=s=t=0;
  for(i=0;i<10;i++)
    {
      if(a[i]>=a[f])
	{
	  t=s;
	  s=f;
	  f=i;
	}
      else if(a[i]>=a[s])
	{
	  t=s;
	  s=i;
	}
      else if(a[i]>=a[t])
	{
	  t=i;
	}
    }
  printf("%d\n%d\n%d\n",a[f],a[s],a[t]);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:9: error: 's' undeclared (first use in this function)
    7 |   int f=s=t=0;
      |         ^
main.c:7:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:11: error: 't' undeclared (first use in this function)
    7 |   int f=s=t=0;
      |           ^
Language: C

#include<stdio.h>

int array[10],i,first=0,second=0,third=0;

int main(void){
        for(i=0;i<10;i++){
        printf("height of mountain %d(integer)",i+1);
        scanf("%d",&array[i]);
        }
        
        for(i=0;i<10;i++){
                
                if(array[i]>first){
                        third=second;
                        second=first;
                        first=array[i];
                        }
                
                if(array[i]<first && array[i]>second){
                        third=second;
                        second=array[i];
                        }
                
                if(array[i]<first && array[i]<second && array[i]>third){
                        third=array[i];
                        }

                }
        
          
        printf("%d\n%d\n%d\n",first,second,third);
        
        return 0;

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

int height[10]={1819,2003,876,2840,1723,1673,3776,2848,1592,922};
int minh=10000;
int askmax(){
	int maxh=0;
	int maxindex=0;
	for(int i=0;i<10;i++){
		if(height[i]>height[maxindex]){
			maxindex=i;
		}
	}
	maxh=height[maxindex];
	height[maxindex]=minh;
	return maxh;
}

int askmin(){
	for(int i=0;i<10;i++){
		if(height[i]<minh){
			minh=height[i];
		}
	}
	return minh;
}
int main(){
	minh=askmin();
	printf("height of the 1st mountain %d\n",askmax());
	printf("height of the 2nd mountain %d\n",askmax());
	printf("height of the 3rd mountain %d\n",askmax());

}

Compiler output:
main.c: In function 'main':
main.c:26:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   26 |         printf("height of the 1st mountain %d\n",askmax());
      |         ^~~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'printf'
  +++ |+#include <stdio.h>
    1 | int height[10]={1819,2003,876,2840,1723,1673,3776,2848,1592,922};
main.c:26:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   26 |         printf("height of the 1st mountain %d\n",askmax());
      |         ^~~~~~
main.c:26:9: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

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

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

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




return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:14: error: expected expression before '<' token
    7 |         if(c=<b){
      |              ^
main.c:11:20: error: expected expression before '<' token
   11 |         }else if(d=<b){
      |                    ^
main.c:15:20: error: expected expression before '<' token
   15 |         }else if(e=<b){
      |                    ^
Language: C

#include<stdio.h>
#include<conio.h>
int main(void)
{


int array[10],c,j,m,swap;
for(c=0;c<10;c++)
{
//printf("Please enter value for array[%d] : ",c);
scanf("\n%d",&array[c]);
}
printf("\n");
//printf("\nThe orignal values . . . \n");
//for(c=0;c<5;c++)
//printf("%d \t",array[c]);
for(c=0;c<9;c++)
{
m=c;
for(j=c+1;j<10;j++)
if(array[j]>array[m])
m=j;
if(m!=c)
{
swap=array[c];
array[c]=array[m];
array[m]=swap;
}
}
//printf("\nThe value in Descending order \n");
for(c=0;c<10;c++)
printf("%d\n",array[c]);
getch();

return 0;
}

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

#include<stdio.h>

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

Compiler output:
main.c: In function 'main':
main.c:10:25: error: expected ';' before ')' token
   10 |         for(i=0,i<10;i++) {
      |                         ^
      |                         ;
main.c:11:35: error: expected ';' before ')' token
   11 |                 for(j=i, j<10; j++) {
      |                                   ^
      |                                   ;
main.c:12:28: error: 'a' undeclared (first use in this function)
   12 |                         if(a[i] < a[j]) {
      |                            ^
main.c:12:28: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int N ;
  vector<int>Muntain(N);
  for(int i = 0; i < N; i++){
    cin >> Mountain(i);
  }
  sort(Mountain.begin(), Mountain.endl());

  for(int j = 0; j < 3; j++){
    cout << Mountain(j) << endl;
  }
    }
  }
}



Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: 'Mountain' was not declared in this scope; did you mean 'Muntain'?
    8 |     cin >> Mountain(i);
      |            ^~~~~~~~
      |            Muntain
a.cc:10:8: error: 'Mountain' was not declared in this scope; did you mean 'Muntain'?
   10 |   sort(Mountain.begin(), Mountain.endl());
      |        ^~~~~~~~
      |        Muntain
a.cc: At global scope:
a.cc:16:3: error: expected declaration before '}' token
   16 |   }
      |   ^
a.cc:17:1: error: expected declaration before '}' token
   17 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int N ;
  vector<int>Mountain(N);
  for(int i = 0; i < N; i++){
    cin >> Mountain(i);
  }
  sort(Mountain.begin(), Mountain.endl());

  for(int j = 0; j < 3; j++){
    cout << Mountain(j) << endl;
  }
    }
  }
}



Compiler output:
a.cc: In function 'int main()':
a.cc:8:20: error: no match for call to '(std::vector<int>) (int&)'
    8 |     cin >> Mountain(i);
      |            ~~~~~~~~^~~
a.cc:10:35: error: 'class std::vector<int>' has no member named 'endl'; did you mean 'end'?
   10 |   sort(Mountain.begin(), Mountain.endl());
      |                                   ^~~~
      |                                   end
a.cc:13:21: error: no match for call to '(std::vector<int>) (int&)'
   13 |     cout << Mountain(j) << endl;
      |             ~~~~~~~~^~~
a.cc: At global scope:
a.cc:16:3: error: expected declaration before '}' token
   16 |   }
      |   ^
a.cc:17:1: error: expected declaration before '}' token
   17 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
    vector<int> mountain;
    for(int i = 0; i < 10; i++){
      cin >> mountian.at(i);
    }
    sort(moutain.begin(), moutain.end());

    for (int i = 0; i < 3; i++) {
        cout << moutain.at(i) << endl;
    }
}

  
}



Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: 'mountian' was not declared in this scope; did you mean 'mountain'?
    7 |       cin >> mountian.at(i);
      |              ^~~~~~~~
      |              mountain
a.cc:9:10: error: 'moutain' was not declared in this scope; did you mean 'mountain'?
    9 |     sort(moutain.begin(), moutain.end());
      |          ^~~~~~~
      |          mountain
a.cc: At global scope:
a.cc:17:1: error: expected declaration before '}' token
   17 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
    vector<int> mountain;
    for(int i = 0; i < 10; i++){
      cin >> mountain.at(i);
    }
    sort(moutain.begin(), moutain.end());

    for (int i = 0; i < 3; i++) {
        cout << moutain.at(i) << endl;
    }
}

  
}



Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: 'moutain' was not declared in this scope; did you mean 'mountain'?
    9 |     sort(moutain.begin(), moutain.end());
      |          ^~~~~~~
      |          mountain
a.cc: At global scope:
a.cc:17:1: error: expected declaration before '}' token
   17 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
    vector<int> mountain;
    for(int i = 0; i < 10; i++){
      cin >> mountain.at(i);
    }
    sort(mountain.begin(), mountain.end());
    reverse(moutain.begin(), moutain.endl());

    for (int i = 0; i < 3; i++) {
        cout << mountain.at(i) << endl;
    }
}



Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: 'moutain' was not declared in this scope; did you mean 'mountain'?
   10 |     reverse(moutain.begin(), moutain.endl());
      |             ^~~~~~~
      |             mountain
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
    vector<int> mountain;
    for(int i = 0; i < 10; i++){
      cin >> mountain.at(i);
    }
    sort(mountain.begin(), mountain.end());
    reverse(mountain.begin(), mountain.endl());

    for (int i = 0; i < 3; i++) {
        cout << mountain.at(i) << endl;
    }
}



Compiler output:
a.cc: In function 'int main()':
a.cc:10:40: error: 'class std::vector<int>' has no member named 'endl'; did you mean 'end'?
   10 |     reverse(mountain.begin(), mountain.endl());
      |                                        ^~~~
      |                                        end
Language: C++


using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: 'cin' was not declared in this scope
    7 |                 cin >> x[i];
      |                 ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | 
a.cc:9:14: error: 'begin' was not declared in this scope
    9 |         sort(begin(x), end(x));
      |              ^~~~~
a.cc:1:1: note: 'std::begin' is defined in header '<iterator>'; this is probably fixable by adding '#include <iterator>'
  +++ |+#include <iterator>
    1 | 
a.cc:9:24: error: 'end' was not declared in this scope
    9 |         sort(begin(x), end(x));
      |                        ^~~
a.cc:9:24: note: 'std::end' is defined in header '<iterator>'; this is probably fixable by adding '#include <iterator>'
a.cc:9:9: error: 'sort' was not declared in this scope; did you mean 'short'?
    9 |         sort(begin(x), end(x));
      |         ^~~~
      |         short
a.cc:10:9: error: 'cout' was not declared in this scope
   10 |         cout << x[9];
      |         ^~~~
a.cc:10:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++


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


Compiler output:
a.cc: In function 'int main()':
a.cc:5:17: error: 'cin' was not declared in this scope
    5 |                 cin >> x[i];
      |                 ^~~
a.cc:7:14: error: 'begin' was not declared in this scope
    7 |         sort(begin(x), end(x));
      |              ^~~~~
a.cc:7:24: error: 'end' was not declared in this scope
    7 |         sort(begin(x), end(x));
      |                        ^~~
a.cc:7:9: error: 'sort' was not declared in this scope; did you mean 'short'?
    7 |         sort(begin(x), end(x));
      |         ^~~~
      |         short
a.cc:8:9: error: 'cout' was not declared in this scope
    8 |         cout << x[9];
      |         ^~~~
Language: C++

//
//  main.cpp
//  kyougi
//
//  Created by 寺林 一旭 on 2018/08/27.
//  Copyright © 2018年 寺林 一旭. All rights reserved.
//

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



Compiler output:
a.cc: In function 'int main()':
a.cc:22:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   22 |     sort(list.begin(), list.end(), greater<int>());
      |     ^~~~
      |     short
Language: C++

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

int main()
{
 int i;
 vector<int> a;
 int c;
 for(i=0;i<10;i++)
 {
  cin>>c;
  a.push_back(c)
 }

  sort(a.begin(),a.end());

  cout<<a[9]<<endl<<a[8]<<endl<<a[7];

}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:17: error: expected ';' before '}' token
   14 |   a.push_back(c)
      |                 ^
      |                 ;
   15 |  }
      |  ~
Language: C++

#include<iostream>
#include<vector>

using namespace std;

const int numOfMountain = 10;

int main(int argc, char* argv[]){
    int mountainBuf;
    vector<int> mountains;

    for(int i = 0; i <= numOfMountain; i++) {
        mountainBuf = atoi(argv[i]);
        mountains.push_back(mountainBuf);
    }

    sort(mountains.begin(), mountains.end());

    auto out = mountains.end();
    for(int i = 0; i < 3; i++) {
        cout << *--out << endl;
    }

    return 0;
}


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

#include <iostream>
#include <vector>
#include <iterator>
#include <cstdlib>
#include <algorithm>

using namespace std;

const int numOfMountain = 10;

int main(int argc, char** argv){
    int mountainBuf;
    vector<int> mountains;

    for(int i = 0; i <= numOfMountain; i++) {
        mountainBuf = atoi(argv[i]);
        mountains.push_back(mountainBuf);
    }

    sort(mountains.begin(), mountains.end());

    __wrap_iter out = mountains.end();
    for(int i = 0; i < 3; i++) {
        cout << *--out << endl;
    }

    return 0;
}


Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:22:5: error: '__wrap_iter' was not declared in this scope
   22 |     __wrap_iter out = mountains.end();
      |     ^~~~~~~~~~~
a.cc:24:20: error: 'out' was not declared in this scope
   24 |         cout << *--out << endl;
      |                    ^~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: 'i' was not declared in this scope
    9 |         for(i=0;i<3;i++)
      |             ^
a.cc:14:25: error: 'j' was not declared in this scope
   14 |                 cout<<b[j]<<endl;
      |                         ^
Language: C++



#include <iostream>

using namespace std;

int main(int argc, const char * argv[])
{

    int *input = new int[10];
    
    for(int i=0;i<10;i++){
        cin >> input[i];
    }
    
    sort(input, input +10);
    
    for(int i=0;i<3;i++){
        cout << input[9-i] << endl;
    }
    
    return 0;
}

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

#include<iostream>
using namespace std;
int main(){
int h[10];
int i;
for(i=0;i<10;i++)cin>>h[i];
sort(h,h+10);
for(i=0;i<3;i++)cout<<h[i]<<endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:1: error: 'sort' was not declared in this scope; did you mean 'short'?
    7 | sort(h,h+10);
      | ^~~~
      | short