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<bits/stdc++.h>

using namespace std;

int main(){
  int n;
  int mount[10]={};

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

  for(int i=9;i > 6;i--){
    
    cout << mount[i] << " ";
  }
  cout << endl;
  
  return 0;
}

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

C++: #include<stdio.h>

int main()

{
    int height[15],i,j,temp;

    for(i=0;i<10;i++)
        scanf("%d",& height[i]);
    for(i=0;i<10;i++)
    {
        for(j=i+1;j<10;j++)
        {
            if(height[i]>height[j]){

                temp=height[j];
                 height[j]=height[i];
                 height[i]=temp;

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

      }
    return 0;
}

C++: int main(){
int a[10];
int max = 0;
int max2 = 0;
int max3 = 0;
int i;
int tmp;

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

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


int tmp2;
for(int i = 0; i< 10; i++){
if(max2 < a[i] && tmp != i){

 max2 = a[i];
tmp2 = i;
}
}
for(i = 0; i< 10; i++){
if(max3 < a[i]&& tmp != i&& tmp2 != i) max3 = a[i];
}

std::cout << max<< std::endl;
std::cout << max2<< std::endl;
std::cout << max3<< std::endl;



	return 0;
}

C++: #include<iostream>

using namespace std;

int main() {
  int a[10];
  for (int i = 0; i < 10; i++ ) {
    cin >> a[i];
  }
  sort(a, a+ 9);
  printf("%d\n", a[9]);
  printf("%d\n", a[8]);
  printf("%d\n", a[7]);
}

C++: #include<iostream>

using namespace std;
 
int main(){
  int x[10],tmp,i,j;

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

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

  for(i=0; i<3; ++i)
    cout << x[i] << "\n";

    return 0;
}

C++: #include <cstdio>
#include <cstdlib>
#include <cstdint>
#include <cstring>
#include <cctype>
#include <iostream>
#include <sstream>
#include <vector>
#include <list>
#include <deque>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <unordered_map>
#include <unordered_set>
#include <algorithm>
#include <functional>
using namespace std;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef long long ll;
const double PI = 3.141592653589793238462643383279502884L;
const int LARGE_INT = 1000000007;
#define all(c) (c).begin(), (c).end()
#define rall(c) (c).rbegin(), (c).rend()
#define tr(c, i) for(auto i = (c).begin(); i != (c).end(); i++)
#define rtr(c, i) for(auto i = (c).rbegin(); i != (c).rend(); i++)
#define repfn(i,a,cont,next) \
  for(auto i = (a); [=](){return(cont);}(); i = [=](){return(next);}())
#define repby(i,a,b,s) repfn(i,a,i<b,i+s)
#define repab(i,a,b) repby(i,a,b,1)
#define rep(i,b) repab(i,0,b)
#define pb push_back
#define sz(c) int((c).size())

int main(int argc, char **argv)
{
  vi v;
  int tmp;
  rep (i, 10) {
    cin >> tmp;
    v.pb(tmp);
  }
  sort(rall(v));
  rep (i, 3) {
    cout << v[i] << endl;
  }

  return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
	int i,k=0,tmp,a[10];
	

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

	while(1){//無限ループ
		for(i=0;i<9;i++){
			if(a[i]<a[i+1]){//もし昇順でない場合
				tmp=a[i];//隣接しあう値を昇順に入れ替える
				a[i]=a[i+1];
				a[i+1]=tmp;
				k++;//カウント
			}
		}
		if(k==0) break;//入れ替える必要がなくなったら終了
		k=0;//カウントの初期化
	}
	cout<<a[0]<<endl;
	cout<<a[1]<<endl;
	cout<<a[2]<<endl;
}

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

const int MAX_N = 9;
int a[MAX_N];
  
int main(){

    for(int i=0; i<=MAX_N; i++){
        cin >> a[i];
    }
     
    std::sort(a,a+10);
    cout << a[9] << endl << a[8] << endl << a[7] << endl;

    return 0;
}

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

int main(){
        int i;
        int high[10];
        for(i = 0; i < 10; i++){
                high[i] << cin;
        }
        partial_sort(high, high + 3, greater<int>());
        cout << high[0] << endl
                << hiht[1] << endl
                << high[2] << endl;y
        return 0;
}

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

void swap(int &x, int &y)
{
    int tmp = x;
    x = y;
    y = tmp;
}

int main(void){

	int a[11],max1,max2,max3;

	for (int i=1; i<11; i++){
		while (true){ 
		cout << "山の高さ" << i << "（整数）" ;			
		cin >> a[i];
		if ((cin.good() == 1) && (a[i] >= 0) && (a[i] <= 10000)) {
			break;
		}
		}	
	}

	max1 = a[1];

	for (int i=2; i<11; i++){
		if (max1 < a[i]){
			swap(max1,a[i]);
		}
	}
	max2 = a[2];

	for (int i=3; i<11; i++){
		if (max2 < a[i]){
			swap(max2,a[i]);
		}
	}
	max3 = a[3];

	for (int i=4; i<11; i++){
		if (max3 < a[i]){
			swap(max3,a[i]);
		}
	}


		cout << max1 << endl;
		cout << max2 << endl;
		cout << max3 << endl;
		

return 0;
	}

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

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

using namespace std;

int main(){
	vector<int> vc;
	int n;

	while(cin >> n){
		vc.push_back(n);
	}

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

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

C++: #include <stdio.h>
#include <algorithm>
using namespace std;
int main(){
	const int N=10;
	int height[N];
	for(int i=0;i<10;i++){
		scanf("%d",&height[i]);
	}
	sort(height,height+N);
	reverse(height,height+N);
	for(int j=0;j<3;j++){
		printf("%d\n",height[j]);
	}
	return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
    int a[10];
    for(int i=0; i<10; i++){
            cout<<"Height of mountain "<<i+1<<" ";
        cin>>a[i];
        cout<<endl;
    }
    for(int i=0; i<10; i++)
        for(int j=0; j<9-i; j++)
            if(a[j]<a[j+1])
                swap(a[j],a[j+1]);

        cout<<"Height of 1st mountain "<<a[2]<<endl;
        cout<<"Height of 2nd mountain "<<a[1]<<endl;
        cout<<"Height of 3rd mountain "<<a[0];
        return 0;
}

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

C++: #include <iostream>
#include <queue>
#include <vector>
#include <set>
#include <algorithm>
#include <stdio.h>
//#define int long long
inline int in() { int32_t x; scanf("%d", &x); return x ;}
using namespace std;
const int INF = 1e18;
const int MAX_N = 1e5 + 5;
struct top3
{
    int a[4] = {0 , 0 , 0 , 0};
    void add(int x)
    {
        a[3] = x;
        sort(a , a + 4 , greater<int>());
    }
}tp;
int32_t main()
{
    int x;
    
    while (scanf("%d",&x) != EOF)
    {
        tp.add(x);
    }
    
    cout << tp.a[0] << endl << tp.a[1] << endl << tp.a[2] << endl;
}

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

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

	return 0;
}