Go: package main

import (
        "fmt"
        "bufio"
        "os"
        "strconv"
)

func main() {
        fp := os.Stdin
        scanner := bufio.NewScanner(fp)
        var lst [3]int

        for scanner.Scan() {
                num, _ := strconv.Atoi(scanner.Text())
                if lst[0] < num {
                        lst[2] = lst[1]
                        lst[1] = lst[0]
                        lst[0] = num
                } else if lst[1] < num {
                        lst[2] = lst[1]
                        lst[1] = num
                } else if lst[2] < num {
                        lst[2] = num
                }
        }

        for _, i := range lst {
                fmt.Printf("%d\n", i)
        }
}

C++: #include<iostream>
using namespace std;

int main(){
	int top[3]={0,0,0},cur;
	for (int i = 0; i < 10; i++)
	{
		cin>>cur;
		if(cur>top[0]){
			top[2]=top[1];
			top[1]=top[0];
			top[0]=cur;
		}else if(cur>top[1]){
			top[2]=top[1];
			top[1]=cur;
		}else if(cur>top[3]){
			top[2]=cur;
		}
	}
}

C++: #include <iostream>
#include <algorithm>
#define REP(i,n) for(int i=0;i<n;i++)
using namespace std;

int main(){
  int high[10];
  REP(i,10){
    cin >> high[i];
  }
  sort(high,high+10);
  cout << high[9] << endl;
  cout << high[8] << endl;
  cout << high[7] << endl;
}

C++: #include <iostream>
#include <algorithm>
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];
	
}

C++: #include <cstdio>
#include <cstdlib>
#include <iostream>

using namespace std;

int num[10];

int cmp(const void *a, const void *b) {
	return *(int *)b - *(int *)a; 
}

int main() {
	while (scanf("%d", &num[0]) != EOF) {
		for (int i=1; i<10; ++i) scanf ("%d", &num[i]);
		qsort(num, 10, sizeof(int), cmp);
		printf ("%d\n%d\n%d\n", num[0], num[1], num[2]);
	}
	return 0;
}

C++: #include <iostream>
#include <array>
#include <algorithm>

using namespace std;

int main() {
	array<int, 10> input;
	for(auto& i : input)
		cin >> i;
	sort(input.begin(), input.end(), greater<int>());
		cout << input[0] << endl
			 << input[1] << endl
			 << input[2] << endl;;
	return 0;
}

C++: #include <iostream>
using namespace std;

int main() {
	int 1st, 2nd, 3rd;
	1st=0;
	2nd=0;
	3rd=0;
	int i;
	for(i=1;i<=10;i++){
		if(height of mountain i > 3rd){
			if(height of mountain i > 2nd){
				if(height of mountain i > 1st){
					1st=i;
				}else{
					2nd=i;
				}
			}else{
				3rd=i;
			}
		}
	}
	cout << 1st << endl;
	cout << 2nd << endl;
	cout << 3rd << endl;
	return 0;
}

C++: #include <iostream>
#include <algorithm>

using namespace std;

int main() {
	int mountain[10];
	int m_max[3];
	int MAX;
	int count = 0;
	int n;

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

	MAX = mountain[0];

	while(count != 3){

		for(int i = 0; i < 10; i++) {
			if(MAX < mountain[i]) {
				MAX = mountain[i];
				n = i;
			}
		}

		m_max[count] = MAX;
		count++;
		mountain[n] = 0;
		MAX = 0;

	}

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

}

C++: #include<iostream>
#include<algorithm>
using namespace std;

int main(){
    int first = 0;
    int second = 0;
    int third = 0;
    int array[10];
    
    for(int i=0; i<10; i++){
        cin >> array[i];
    }
    sort(array, array+10);
    for(int i=9; i>6; i--){
        cout << array[i] << endl;
    }

    return 0;
}

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

C++: #include <iostream>

int main(void){

	int max1=0,max2=0,max3=0;
	int montain[10] = { 1819, 2003, 876, 2840, 1723, 1673, 3776, 2848, 1592, 922 };
	int tmp = 0;

	for (int i = 0; i < 9; i++){
		for (int j = 9; j > i; j--){
			if (montain[j - 1] > montain[j]){
				tmp = montain[j];
				montain[j] = montain[j - 1];
				montain[j - 1] = tmp;
			}
		}
	}

	printf("%d\n%d\n%d\n", montain[9], montain[8], montain[7]);

	return 0;
	
}

C++: #include <vector>
#include <iostream>
#include <algorithm>
using namespace std;

int main(){
	int height;
	vector<int> heights;
	while(cin >> height)
		heights.push_back(height);
	sort(heights.begin(), heights.end());
	cout << heights[9] << endl;
	cout << heights[8] << endl;
	cout << heights[7] << endl;
	return 0;
}

C++: #include <stdio.h>
int main()
{
  int f=0,s=0,t=0,m,i;
  for(i=0;i<10;i++){
    scanf("%d",&m);
    if(m>f){
      t=s;
      s=f;
      f=m;
    }
    else if(m>s){
      t=s;
      s=m;
    }
    else if(m>t){
      t=m;
    }
  }
  printf("%d\n%d\n%d\n",f,s,t);
  return 0;
}

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;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main(){
  vector<int> hill(10);
  for(int i=0; i<10; i++) cin >>hill[i];
  sort(hill.begin(),hill.end());
  for(int i=9; i>6; i--) cout <<hill[i]<<endl;
  return 0;
}

C++: #include <stdio.h>

int main(){
  int i, mt[10], max=0, max2=0, max3=0;
  for (i = 0; i < 10; i++){
    scanf("%d", &mt[i]);
    if(max <mt[i]) max = mt[i];
    else if (max2 <mt[i]) max2 = mt[i];
    else if (max3 <mt[i]) max3 = mt[i];
  }
  printf("%d\n%d\n%d\n",max, max2, max3);
  return 0;
}

C++: #include <cstdio>
#include <iostream>

using namespace std;

int num[10];

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

C++: #include<iostream>
using namespace std;
int main(){
	int a[10];
	for(int i=0;i<10;i++){
		scanf("%d",&a[i]);
		}
		int first=-1;
		int second=-1;
		int third=-1;
		for(int j=0;j<10;j++){
			if(a[j]>first){
				first=a[j];
			}
			else if(a[j]>second){
				second=a[j];
			}
			else if(a[j]>third){
				third=a[j];
			}
			cout<<first<<endl;
			cout<<second<<endl;
			cout<<third<<endl;
		}
		return 0;
}

C++: #include<iostream>
#include<vector>
using namespace std;

int main(){
	vector<int> top(3);
	int height;
	while(cin >> height){
		for(vector<int>::iterator itr = top.begin(); itr != top.end(); ++itr){
			if(height > *itr){
				top.insert(itr, height);
				top.pop_back();
				break;
			}
		}
	}
	for(vector<int>::iterator itr = top.begin(); itr != top.end(); ++itr){
		cout << *itr << endl;
	}
	return 0;
}

C++: #include<cstdio>
#include<algorithm>

using namespace std;

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

C++: #include <iostream>
#include <array>

using namespace std;

int main( void )
{
	// ?????°??£?¨?
	array< int, 10 > array1;

	// ??\?????????
	for ( int i = 0; i < 10; i++ ) {
		cin >> array1[ i ];
	}

	// ???????????????
	for ( int i = 1; i < 10; i++ ) {
		for ( int j = 0; j < i; j++ ) {
			if ( array1[ j ] > array1[ i ] ) {
				int tmp = array1[ i ];
				array1[ i ] = array1[ j ];
				array1[ j ] = tmp;
			}
		}
	}

	// ????????????
	cout << array1[ 9 ] << endl << array1[ 8 ] << endl << array1[ 7 ] << endl;

}

C++: #include<stdio.h>

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