Go: package main

import (
	"fmt"
	"sort"
)

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

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

	sort.Sort(sort.Reverse(sort.IntSlice(mountains)))

	for i := 0; i < 3; i++ {
		fmt.Println(mountains[i])
	}
}

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

int main(){

	int mt_list[10];

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

	int high[3] = { 0, 0, 0 };
	for (int h = 0; h<3; h++){
		int tmp = 0;
		for (int i = 0; i<10; i++){
			if (high[h] <= mt_list[i]){
				high[h] = mt_list[i];
				tmp = i;
			}
		}
		high[h] = mt_list[tmp];
		mt_list[tmp] = 0;
	}

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

	return 0;
}

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

C++: #include <iostream>
using namespace std;
int main(void){
    int s,w,t,y,roop,i;
    s=0;
    w=0;
    t=0;
    roop=0;
    while(1){
        roop=roop+1;
        cin>>y;
        if(y>=t){
            i=3;
            if(y>=w){
                i=2;
                if(y>=s){
                    i=1;
                }
            }    
        }
        if(i==1){swap(y,s);}else if(i==2){swap(y,w);}else if(i==3){swap(y,t);}
        if(roop>=10){
            break;
        }
        i=0;
    }
    cout<<s<<endl;
    cout<<w<<endl;
    cout<<t<<endl;
}

C++: #include<stdio.h>

int main() {
  int h[3] = {-1, -1, -1},t,s;
  for(int i=0; i<10; ++i) {
    scanf("%d", &t);
    for(int j=0; j<3; ++j) {
      if(h[j] < t) {
	s = h[j];
	h[j] = t;
	t = s;
      }
    }
  }

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

C++: #include <iostream>
const int SIZE=10,TOPNUM=3;
using namespace std;

int main(){
  int height[SIZE],top[TOPNUM+1]={0};
  for( int i=0;i<SIZE;i++ ){
    cin>>height[i];
    if( height[i]<0||10000<height[i] )
      return 1;
    for( int j=0;j<TOPNUM;j++ ){
      if( top[j]<=height[i] ){
	for( int k=TOPNUM;k>j;k-- ){
	  top[k]=top[k-1];
	}
	top[j]=height[i];
	break;
      }
    }

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

C++: #include <stdio.h>

int nList[10],nGet,nSave[3];
int main() {
    for (int i=0;i<10;i++){
            scanf("%i",&nGet);
    nList[i]=nGet;
    }


for (int rf=0;rf<10;rf++ ){
for (int rt=0;rt<10;rt++){
for (int rs=0;rs<10;rs++){
    if (nList[rs]>nSave[0]){nSave[0]=nList[rs];}
    else if (nList[rs]>nSave[1]&&nList[rs]!=nSave[0]){nSave[1]=nList[rs];}
    else if (nList[rs]>nSave[2]&&nList[rs]!=nSave[0]&&nList[rs]!=nSave[1]){nSave[2]=nList[rs];}
    }
    }
    }


printf("%i\n%i\n%i",nSave[0],nSave[1],nSave[2]);
}

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

int main(){
  int n=10;
  vector<int> v(n);
  for(int i=0;i<n;i++)cin >> v[i];
  sort(v.begin(),v.end(),greater<int>());
  cout << v[0] << endl << v[1] << endl << v[2] << endl;
}

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

int main()
{
	std::vector<int> vec(10);
	for (int i = 0; i < 10; ++i) {
		std::cin >> vec[i];
	}
	std::nth_element(vec.begin(), vec.begin() + 2, vec.end(), std::greater<int>());
	for (int i = 0; i < 3; ++i) {
		std::cout << vec[i] << std::endl;
	}
	return 0;
}

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

int main()
{
	int n[10],i=0;

	while (cin >> n[i])
		i++;
	sort(n,n+i-1,greater<int>());
	for (int j=0; j < 3; j++) {
		cout << n[j] << endl;
	}

	return 0;
}

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

using namespace std;

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

    sort(h.begin(), h.end(), greater<int>());
    for (size_t i=0; i<3; ++i)
        printf("%d\n", h[i]);

    return 0;
}

C++: #include <stdio.h>

int main(){
    
    int a,b,c,d,e,f,g,h,i,j;
    int n1,n2,n3;
    
    scanf("%d",&a);
    scanf("%d",&b);
    
    if(b > a){
        
        n1 = b
        n2 = a;
        
    }else{
        
        n1 = a;
        n2 = b;
        
    }
    
    scanf("%d",&c);
    
    if(c > n1){
        
        n2 = n1;
        n1 = c;
        
    }else if(c > n2){
        
        n3 = n2;
        n2 = c;
        
    }else{
        
        n3 = c;
        
    }
    
    scanf("%d",&d);
    
    if(d > n1){
        
        n3 = n2;
        n2 = n1;
        n1 = d;
        
    }else if(d > n2){
        
        n3 = n2;
        n2 = d;
        
    }else if(d > n3){
        
        n3 = d;
        
    }
    
    scanf("%d",&e);
    
    if(e > n1){
        
        n3 = n2;
        n2 = n1;
        n1 = e;
        
    }else if(e > n2){
        
        n3 = n2;
        n2 = e;
        
    }else if(e > n3){
        
        n3 = e;
        
    }
    
    scanf("%d",&f);
    
    if(f > n1){
        
        n3 = n2;
        n2 = n1;
        n1 = f;
           
    }else if(f > n2){
        
        n3 = n2;
        n2 = f;
        
    }else if(f > n3){
        
        n3 = f;
        
    }
    
    scanf("%d",&g);
    
    if(g > n1){
        
        n3 = n2;
        n2 = n1;
        n1 = g;
        
    }else if(g > n2){
        
        n3 = n2;
        n2 = g;
        
    }else if(g > n3){
        
        n3 = g;
        
    }
    
    scanf("%d",&h);
    
 if(h > n1){
        
        n3 = n2;
        n2 = n1;
        n1 = h;
        
    }else if(h > n2){
        
        n3 = n2;
        n2 = h;
        
    }else if(h > n3){
        
        n3 = h;
        
    }


    scanf("%d",&i);
    
     if(i > n1){
        
        n3 = n2;
        n2 = n1;
        n1 = i;
        
    }else if(i > n2){
        
        n3 = n2;
        n2 = i;
        
    }else if(i > n3){
        
        n3 = i;
        
    }
    
    
    scanf("%d",&j);
    
     if(j > n1){
        
        n3 = n2;
        n2 = n1;
        n1 = j;
        
    }else if(j > n2){
        
        n3 = n2;
        n2 = j;
        
    }else if(j > n3){
        
        n3 = j;
        
    }
    
    
    printf("%d\n",n1);
    printf("%d\n",n2);
    printf("%d\n",n3);
    

    return 0;   
}

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

int main(){

	int height[10];

	for(int i=0;i<10;i++){
		cout << i+1 << "番目の山の高さ：";
		cin >> height[i];
	}

	int sort[3]={0,0,0};
	int box;

	for(int i=0;i<10;i++){
		if(height[i]>sort[2]){
			sort[2]=height[i];
			if(sort[1]<sort[2]){
				box=sort[1];
				sort[1]=sort[2];
				sort[2]=box;
				if(sort[0]<sort[1]){
				box=sort[0];
				sort[0]=sort[1];
				sort[1]=box;
				}
			}
		}
	}

	for(int i=0;i<3;i++){
		cout << i+1 << "番目に高い山の高さ：" << sort[i] << endl;
	}

    return 0;
}

C++: #include <iostream>
#include <string>
#include <cctype>
using namespace std;
int main(){
    string line;
    for(;getline(cin,line);){
        for(int i=0;i<line.size();i++)line[i]=toupper(line[i]);
        cout<<line<<endl;
    }
}

C++: #include <stdio.h>

int main(void)
{
	int i, j, temp = 0, x[10];
	for (i = 0; i < 10; i++){
		//printf("山の高さ%d ", i + 1);
		scanf("%d", &x[i]);
	}
	for (i = 0; i < 10; i++){
		for (j = 9; j > i; j--){
			if (x[j] > x[j - 1]){
				temp = x[j - 1];
				x[j - 1] = x[j];
				x[j] = temp;
			}
		}
	}
	for (i = 0; i < 3; i++){
		printf("%d\n", x[i]);
	}
	
	return 0;
}

C++: #include<cstdio>
#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<string>
#define REP(i,n) for(long long int (i)=0;(i)<(n);i++)


using namespace std;


int main(){
  priority_queue<int,vector<int>,less<int>>Q;
  int n;
  REP(i,10){
    cin >> n;
    Q.push(n);
  }
  REP(i,3){ cout << Q.top()<<endl;Q.pop();
  }
  return 0;
}