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>
using namespace std;
int main(void){
   int n, n1, n2, n3;
   n1 = 0;
   n2 = 0;
   n3 = 0;
   for(int i = 0; i < 10; i++){
       cin >> n;
       if(n > n1){
           n3 = n2;
           n2 = n1;
           n1 = n;
       }
       else if(n > n2){
           n3 = n2;
           n2 = n;
       }
       else if(n > n3){
           n3 = n;
       } 
   }
   cout << n1 << endl << n2 << endl << n3 << endl;
}

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

using namespace std;

int main()
{
	vector<int> a(10);
	for(int i=0;i<10;i++)
		scanf("%d",&a[i]);
	sort(a.begin(),a.end(),greater<int>());
	for(int i=0;i<3;i++)
		printf("%d\n",a[i]);
	
	return 0;
}

C++: #include<iostream>
using namespace std;
int main()
{
	int a,mountain[10],j,k;
	for(int i=0;i<10;i++){
		cin>>mountain[i];
	}
	for(j=0;j<10;j++){
		for(k=0;k<10-j;k++){
			if(mountain[k]<mountain[k+1]){
				a=mountain[k];
				mountain[k]=mountain[k+1];
				mountain[k+1]=a;
			}
		}
	}
	cout<<mountain[0]<<"\n"<<mountain[1]<<"\n"<<mountain[2]<<"\n";
	return 0;
}

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

int main(){
    int mountain[10];
    
    for(int i=0;i<10;i++)
        //scanf("%d",&mountain[i]);
	cin>>mountain[i];
    for(int i=0;i<10;i++){
        for(int j=9;j>i;j--){
	    if(mountain[j]>mountain[j-1]){
            int temp = 0;
			temp = mountain[j];
			mountain[j] = mountain[j-1];
			mountain[j-1] = temp;
	    }
	}
    }

    //結果出力
    for(int i=0;i<10;i++)
         cout<<mountain[i]<<'\n';
    return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
	int takasa[10];
	for(int i=0;i<10;i++){
		cin>>takasa[i];
	}
	for(int i=0;i<9;i++){
		for(int j=i+1;j<10;j++){
			if(takasa[i]<takasa[j]){
				swap(takasa[i],takasa[j]);
			}
		}
	}



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





	return 0;
}

C++: #include<stdio.h>
#include<algorithm>
int main(){
    int a[10];
    for(int i=0;i<10;i++)scanf("%d",&a[i]);
    std::sort(a,a+10);
    printf("%d\n%d\n%d\n",a[9],a[8],a[7]);
}

C++: #include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
bool cmp(int x,int y)
{
	return x > y;

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

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

using namespace std;

vector<int> heights;
int input;

int main(){
 while(cin >> input) heights.push_back(input);
 sort(input.begin(), input.end());
 auto itr = input.end();
 cout << *itr << "\n" << *(itr-1) << "\n" << *(itr-2) << endl;

 return 0;
}

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

int main(){
	int height[10];
	int i , j;
	for(i=0 ; i<10 ; i++){
		cin >> height[i] ;
	}
	cout << endl;
	
	for(i=9 ; i>0 ; i--){
		for(j=0 ; j<i ; j++){
			if (height[j]>=height[j+1]){
				height[j]^=height[j+1];
				height[j+1]^=height[j];
				height[j]^=height[j+1];
			}
		}
	}
	for(i=9 ; i>6 ; i--){
		cout << height[i] << endl;
	}
	return 0;
}

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

int main()
{
  int a[11]={0};
  int i,j,maxa,maxb,maxc;
  

  for(i=0; i<10; i++){
    scanf("%d",&a[i]);
    //    maxa=max(maxa,a[i]);
  }

  for(i=0; i<10; i++){
    for(j=0; j<10; j++){
      if(a[i]>a[j]){
	swap(a[i],a[j]);
      }
    }
  }

  maxa=a[0];
  maxb=a[1];
  maxc=a[2];

  printf("%d\n%d\n%d\n",maxa,maxb,maxc);
  
  return 0;
}

C++: #include<stdio.h>

int main(){
	
	int a[3];
	int o, j;

	a[0] = a[1] = a[2] = 0;
	
	for(j = 0; j < 9; j++){
		
		scanf("%d\n",&o);
		
		if(o == 0){
			
			continue;
			
		}
		
		if(a[0] < o){
			
			a[2] = a[1];
			a[1] = a[0];
			a[0] = o;
			
		}else if(a[1] < o){
			
			a[2] = a[1];
			a[1] = o;
			
		}else if(a[2] < o){
			
			a[2] = o;
			
		}
		
	}
	
	printf("%d\n", a[0]);
	printf("%d\n", a[1]);
	printf("%d\n", a[2]);
	
    return 0;
}

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

int main(){
	int mountains[9] = {};

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

	for(int i = 0; i < 10; i++){
		int maxIndex = 0;
		for(int j = 0; j < 10; j++){
			if(mountains[maxIndex] < mountains[j]){
				maxIndex = j;
			}
		}
		cout << mountains[maxIndex] << endl;
		mountains[maxIndex] = -1;
	}

	return 0;

}

C++: #include<stdio.h>
        
int main(void){
        
    /* 宣言と初期化 */
    int hai[10];
    int id[2]
    int i;
    int temp2nd;
    int temp3rd;
    int tempmax;
        
for(i=0;i<10;i++)
{
scanf("%d",&hai[i]);
}
    /* 代入 */
    temp2nd=hai[0];
    tempmax=hai[0];
    temp3rd=hai[0];
        
    /* 計算 */
    for(i=0;i<10;i++){
        /* 最大値求める */
        if(hai[i]>tempmax)
       { tempmax=hai[i];id[0]=i;}
    }
        
    for(i=0;i<10;i++){
        /*2番目求める */
        if(hai[i]<tempmax&&hai[i]>temp2nd&&i=!id[0])
        {temp2nd=hai[i];id[1]=i;}
    }
        
    for(i=0;i<10;i++){
        /* 3番目求める */
        if(hai[i]>temp3rd&&hai[i]<temp2nd && i =! id[1] && i =! id[0])
       {temp3rd=hai[i];}
    }
        
    /* 表示 */
    printf("最も高い山の高さ　%d\n",tempmax);
    printf("２番目に高い山の高さ　%d\n",temp2nd);
    printf("３番目に高い山の高さ　%d\n",temp3rd);
        
    return 0;
}

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

int main() {
  vector<int> a(10); for (int i = 0; i < 10; ++i) cin >> a[i];
  sort(begin(a), end(a), greater<int>());
  for (int i = 0; i < 3; ++i) cout << a[i] << endl;
  return 0;
}

C++: #include <iostream>
 
 
void Sort(int* a){
int tmp;
for(int i=0;i<10;i++){
for(int j=0;j<9;j++){
if(a[j]<a[j+1]){
tmp = a[j+1];
a[j+1]=a[j];
a[j] = tmp;
}
}
}
}
 
 
 
int main(){
 
int a[10];
 
for(int i=0;i<10;i++){
std::cin >> a[i];
}
Sort(a);
 
std::cout << a[0] << std::endl;
std::cout << a[1] << std::endl;
std::cout << a[2] << std::endl;
 
 
}

C++: #include<iostream>
#include<stdio.h>
#include<algorithm>
using namespace std;
int main()
{
    int s[11],i;
    for(i=0;i<10;i++){
        scanf("%d",&s[i]);
    }
    sort(s,s+10);
    for(i=9;i>6;i--){
        printf("%d\n",s[i]);
    }
 return 0;
}

C++: #include<iostream>
using namespace std;
int main()
{
    int a[10],b[3],c,d,i,j,s=0;
    for(i=0;i<10;i++)
    {
        cin >> a[i];
    }
    for(d=0;d<3;d++)
    {
    for(j=0;j<10;j++)
    {
        if(a[j]>s)
        {
            s=a[j];
            c=j;
        }
    }
    cout<<s<<endl;
    a[c]=0;
    s=0;
    }
    return 0;
}

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

int main(){
    vecctor<int> v;
    int num;
    for(int i = 0;i<10;i++){
        cin>>num;
        v.push_back(num);
    }

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


    for(int i = 0;i<3;i++)
        cout<<v.at(i);
    return 0;
}

C++: #include<bits/stdc++.h>
using namespace std ;
int main()
{
	int array[10] ;
	for(int i=0;i<10;i++)
	{
		cin>>array[i] ;
	}
	sort(array,array+10) ;
	for(int i=9;i>=7;i--)
	{
		cout<<array[i]<<endl ;
	}

}

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

int main() {
	int h[10];
	int rank[3];
	for(int i = 0; i < 3; i++){
		rank[i] = 0;
	}
	for(int i = 0; i < 10; i++){
		cin >> h[i];
	}
	for(int i = 0; i < 10; i++){
		if(h[i] >= rank[0]){
			rank[2] = rank[1];
			rank[1] = rank[0];
			rank[0] = h[i];
		} else if(h[i] >= rank[1]) {
			rank[2] = rank[1];
			rank[1] = h[i];
		} else if(h[i] >= rank[2]){
			rank[2] = h[i];
		}
	}
	for(int i = 0; i < 3; i++){
		cout << rank[i] << endl;
	}
	return 0;
}