Go: package main

import (
	"fmt"
	"sort"
)

func main() {
	mt := make([]int, 10)

	for i := 0; i < 10; i++ {
		fmt.Scan(&mt[i])
	}

	sort.Ints(mt)
	fmt.Printf("%d\n%d\n%d\n", mt[9], mt[8], mt[7])

}

C++: #include <iostream>
#include <stdio.h>
#include <stdlib.h>
#define N 10
int main(int argc, const char * argv[])
{
    int x=0;
    int max1=-1;
    int max2=-2;
    int max3=-3;
    
    for(int j=0; j<N; j++){
        scanf("%d\n",&x);
        if(max1<=x){
            max3=max2;
            max2=max1;
            max1=x;
        }else if(max2<=x){
            max3=max2;
            max2=x;
        }else if(max3<=x){
            max3=x;
        }
        printf("%d\n",max1);
        printf("%d\n",max2);
        printf("%d\n",max3);

    }
}

C++: #include<iostream>
using namespace std;
int main()
{
    int n,a[100],i,j,temp;
    cin>>n;
    for(i=0;i<n;i++)
    {
        cin>>a[i];

    }
    cout<<"\n"<<endl;
    for(i=0;i<n;i++)
    {
        for(j=i+1;j<n;j++)
        {
            if(a[i]<a[j])
            {
                temp=a[i];
                a[i]=a[j];
                a[j]=temp;
            }
        }
    }
    for(i=0;i<3;i++)
    {
        cout<<a[i]<<endl;
    }

   return 0;
}

C++: #include<stdio.h>
#include<algorithm>
using namespace std;
int main()
{
    int arr[10];
    int i,j;
    for(i=0;i<10;i++)
    {
        scanf("%d",&arr[i]);
    }
    sort(arr,arr+10);
    for(i=9;i>=7;i--)
    {

        printf("%d\n",arr[i]);
    }

    return 0;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
int main(void){
std::vector<int> h;
int tmp;
while(std::cin>>tmp){
h.push_back(tmp);
}

auto p=std::unique(h.begin(),h.end());
std::sort(h.begin(),p);
for(int i=0;i<3;i++){
std::cout<<h[i]<<std::endl;
}
return 0;
}

C++: #include <stdio.h>
#include <string.h>


int main()
{
	int m[100],temp[100];
	for(int i=0;i<10;i++)
	{
		scanf("%d",&m[i]);
	}
	for(int i=0;i<10;i++)
	{
		if(m[i]<m[i+1])
		{
			temp[i]=m[i+1];
			m[i+1]=m[i];
			m[i]=temp[i];
			i=-1;
		}
		
	}
	printf("%d\n%d\n%d\n",m[0],m[1],m[2]);
	return 0;
}

C++: #include<bits/stdc++.stdc>
using namespace std;
int main(){
int a[10];
for(int i =0; i < 10; i++){
cin >> a[i];
}
sort( a, a + 10, greater<int>());
for(int j = 0; j < 3; j++){
cout << a[j] << endl;
}
return 0;
}

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

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

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

int main(){

	list<int> height;
	int h;

	for(int i=0;i<10;++i){
		cin>>h;
		height.push_back(h);
	}

	height.sort();

	list<int>::iterator it=height.begin();

	for(int i=0;i<3;++i){
		cout<<*it;
		++it;
	}

    return 0;
}

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

int main(){
	int h[10]={};
	

	for(short int i=1; i<=10;i++){
		cin >> h[i];
	}
	sort(h, h+10, greater<int>());
	for(short int i=0;i<3;i++){
		cout << h[i] << endl;
	}
	return 0;
}

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

int main()
{
	int iHigh[10];

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

	sort( iHigh,iHigh+10,greater<int>() );

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

	return 0;
}

C++: #include<iostream>
#include<queue>
#include<string>
#include<stack>
#include<cstdio>

using namespace std;

int main(void)
{
  int a[10]={};
  int i=0;
  int j=0;

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

  sort(a,a+10);

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

}

C++: #include <iostream>
using namespace std;
int main()
{
	int a, res[3] = {0}, i;
	for (i = 0; i < 10; i++)
	{
		cin >> a;
		if (a > res[0])
			res[2] = res[1], res[1] = res[0], res[0] = a;
		else if (a > res[1])
			res[2] = res[1], res[1] = a;
		else if (a > res[2])
			res[2] = a;
	}
	cout << res[0] << endl << res[1] << endl << res[2] << endl;
}

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

int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int in;
    vector<int> v;
    while(cin >> in)
    {
        v.push_back(in);
    }
    sort(v.begin(), v.end());
    for(auto num : v)
        cout << num << endl;
}

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

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

	int height;
	priority_queue<int> pq;

	for(int i = 0; i < 10; i++){
		cin >> height;
		pq.push(height);
	}

	for(int i = 0; i < 3; i++){
		cout << pq.top() << "\n";
		pq.pop();
	}
}

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

C++: #include <bits/stdc++.h>
using namespace std;
int n,a[50];
int main(){
    n=10;
    for(int i=1;i<=n;i++) cin>>a[i];
    sort(a+1,a+1+n);
    for(int i=n;i>=n-2;i--){
        cout<<a[i]<<endl;
    }
}

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

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

using namespace std;

int data;
int mountain[10];

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

	sort(mountain, mountain + 10);

	for(int j=9;j>6;j--){
		printf("%d\n",mountain[j]);
	}

    return 0;
}

C++: #include <stdio.h>
#include <stdlib.h>
#include <string.h>

void print_top3(int *top3) {
	int i;
	for (i = 0; i < 3; i++) {
		printf("%d\n", top3[i]);
	}
}

int main() {
	char buf[256];
	int top3[3];
	int n, i, trade;
	
	// initialize
	memset(top3, 0, sizeof(int) * 3);
	
	while (fgets(buf, sizeof(buf), stdin)) {
		n = atoi(buf);
		
		if (n <= buf[2]) { break; }
		
		top3[2] = n;
		for (i = 1; 0 <= i; i--) {
			if (top3[i] < top3[i + 1]) {
				trade = top3[i];
				top3[i] = top3[i + 1];
				top3[i + 1] = trade;
			}
		}
	}
	
	print_top3(top3);
	
	return 0;
}

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

int main(){
    vector<int> ar(10);
    int i;
    for(i=0;i<10;i++) cin >> ar[i];
    sort(ar.begin(),ar.end());
    for(i=9;i>=7;i--) cout << ar[i] << endl;
    return 0;
}

C++: #include <iostream>
#include <algorithm>
int main() {
  int data[10];
  for (int i = 0; i < 10; i++) {
    std::cin >> data[i];
  }
  std::sort(data,data+10,std::greater<int>());
  for (int i = 0; i < 10; i++) {
    std::cout << data[i] << std::endl;
  }
}

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

int N;

int main(){
	N = 10;
	int t;
	int mh[N];
	
	for(int i=0; i<10; i++){
		cin >> t;
		if(t>=0 && t<=10000)
			mh[i]=t;
		else{
			i=i-1;
		}
	}
	
	for(int i=0; i<10; i++){
		for(int j=i+1; j<10; j++){
			if(mh[i] < mh[j]){
				t = mh[i];
				mh[i] = mh[j];
				mh[j] = t;
			}
		}
	}
	
	for(int i=0; i<3; i++)
		cout << mh[i] << "\n";
	
	return 0;
}

C++: #include<cstdio>

int main(){
    int h[10];
    for(int i=0;i<10;i++)scanf("%d",&h[i]);


    for(int i=0;i<10;i++)
        for(int j=i+1;j<10;j++)
        {
            if(h[i]<h[j])
            {
                int box=h[j];
                h[j]=h[i];
                h[i]=box;
            }
        }


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

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