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

C++: #include <iostream>
#include <queue>
#include <vector>
using namespace std;
 
int main()
{
    priority_queue< int,vector<int>,less<int> > que;
    int in;
 
    for(int i = 0; i < 10; i++){
        cin >> in;
        que.push(in);
    }
 
 
    for(int j = 0; j < 3; j++){
        cout << que.top() << '\n';
        que.pop();
    }
 
    return 0;
}

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

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 hill[10];
  for (int i = 0; i < 10; i++) {
    cin >> hill[i];
  }

  for (int i = 0; i < 3; i++) {
    int max = 0;
    for (int i = 0; i < 10; i++) {
      max = hill[i] > max ? hill[i] : max;
    }

    cout << max << endl;

    for (int i = 0; i < 10; i++) {
      hill[i] = hill[i] == max ? 0 : hill[i];
    }
  }

  return 0;
}

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

int main()
{
    int a[10] , i = 0;
	
    while (i < 10){
		cin>>a[i];
		i++;
    }
	
    reverse(a , a + 10);
	
	i = 0;
	
	while (i < 3){
		cout << a[i] << endl;
		i++;
	}
	
	return 0;
}