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 <stdio.h>
#include <string.h>
#include <stdlib.h>

#define BUFSIZ 8

int main (int ac, char **av) {
  char readline[BUFSIZ] = {0};
  int mountains[3] = {0};
  while (fgets(readline, BUFSIZ, stdin) != NULL) {
    int x = atoi(readline);
    if (mountains[0] == 0) {
      mountains[0] = x;
    } else {
      int idx = 0;
      for (idx = 0; idx < 3; idx++) {
	if (mountains[idx] < x) {
	  memmove(mountains+idx+1, mountains+idx, sizeof(int) * (2-idx));
	  mountains[idx] = x;
	  break;
	}
      }
    }
  }
  int i=0;
  for (i = 0; i < 3; i++) {
    fprintf(stdout, "%d\n", mountains[i]);
  }
      

  return 0;
}

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

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

C++: #include <iostream>
#include <algorithm>
using namespace std;
    
int main(){
	int data,m[10];

	
	for (int j=0;j<=9;j++){
			while(cin >> data){
			if (data<=10000 && data >= 0) {
			m[j]=data;
			break;
		}
			}
	}

for (int j=0;j<=9;j++){
for (int i=0;i<=9;i++){

	if (m[i] < m[i+1])
		std::swap(m[i],m[i+1]);

}
}
 
for (int i=0;i<=2;i++){
cout <<  m[i] <<'\n';
}

    return 0;
}

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

using namespace std;

int main()
{
    int height[10];
    
    for(int i=0; i<10; i++) 
    {
          cin >> height[i];
          
           
    }
    
     for(int i=0; i<10; i++) 
    {
          
          sort(height,height+10);
           
    }
    
    for (int j=0; j<3; ++j)
    {
        cout << height[j]<<endl;
    }
    
    return 0;
}

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

#define BOGO 10

using namespace std;

int main()
{
	int arr[BOGO];
	bool found;
	int j;
	srand(static_cast<unsigned int>(time(NULL)));
	
	for(int i = 0; i < BOGO; i++){
		cin >> arr[i];
	}
	
	for(;;){
		
		/**
		for(int j = 0; j < BOGO; j++){
			cout << arr[j] << flush;
		}
		cout << endl;
		/**/
		
		found = true;
		for(j = 0; j < BOGO-1; j++){
			if(arr[j] > arr[j+1]){
				found = false;
				break;
			}
		}
		
		if(found){
			break;
		}
		random_shuffle(arr, arr+BOGO);
	}
	cout << arr[9] << "\n" << arr[8] << "\n" << arr[7] << endl;
}

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

int main()
{
	int m[10];
	int i, j, n;
	for(i=0; i<10; i++)
		cin >> m[i];

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

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

C++: #include<iostream>

int main(void)
{
	int i,j,max,tmp,high[10];

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

	for(i=0;i<3;i++){
		for(j=1,max=high[0];j<10;j++){
			if(max<high[j]){
				max=high;
				tmp=j;
			}
		}
		high[tmp]=0;
		std::cout << max << std::endl;
	}
	return 0;
}

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

using namespace std;

int main() {
  int tmp;
  vector<int> heights;

  for(int i=0; i<10; i++) {
    cin>>tmp;
    heights.push_back(tmp);
  }
  sort(heights.begin(), heights.end(), greater<int>());
  cout<<heights[0]<<endl<<heights[1]<<endl<<heights[2]<<endl;
}

C++: #include <iostream>
#include <cstdio>
#include <vector>
#include <list>
#include <algorithm>
#include <cmath>
#include <stack>
#include <set>
using namespace std;

#define REP(i,n) for(int (i)=0; (i)<(n); (i)++)
#define FOR(i,a,b) for(int (i)=(a); (i)<(b); (i)++)
#define PUSH(n,v) for(int i=0; i<(n); i++) {int j; cin >> j; v.push_back(j);}
#define ALL(v) v.begin(), v.end()

int main() {
    vector<int> v;
    int i;
    while(cin >> i) {
        v.push_back(i);
    }
    sort(ALL(v), greater<int>());
    cout << v[0] << endl;
    cout << v[1] << endl;
    cout << v[2] << endl;
    return 0;
}

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);
    
    cout<<m[9]<<endl;
    cout<<m[8]<<endl;
    cout<<m[7]<<endl;
    
    
}

C++: #include <iostream>
#include <array>
#include <algorithm>
 
int main(void) {
    std::array<u_int, 10> heights;
    //??\???
    for (u_int i = 0; i < 10; ++i) {
        std::cin >> heights[i];
    }
    //?????????
    std::sort(heights.begin(), heights.end(), std::greater<u_int>());
    //??????
    for (u_int i = 0; i < 3; ++i) {
        std::cout << heights[i] << std::endl;
    }
    return 0;
}

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

using namespace std;

int main() {
  vector<int> A(4);
  while(cin >> A[0]) {
    for(int i = 0; i < 3; i++) {
      if(A[i] >= A[i+1]) swap(A[i], A[i+1]);
      else break;
    }
  }
  for(int i = 3; i > 0; i--) {
    cout << A[i] << endl;
  }
  return 0;
}

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

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

using namespace std;

main(){
	int i, j;
	int data[10] = {0};
	int buf;

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

	for(j = 0; j < 10; j++){
		for(i = 10; i > 0; i--){
			if(data[i] > data[i - 1]){
				buf = data[i - 1];
				data[i - 1] = data[i];
				data[i] = buf;
			}
		}
	}

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

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

C++: hoge

C++: #include <bits/stdc++.h>

using namespace std;

int main() {

	vector<int> a(10, 0);
	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<stdio.h>
#include<iostream>
using namespace std;
int main(){
	int a = 0, b = 0, c = 0, d = 0;
	for (int i = 0; i < 10; i++){
		cin >> a;
		if (a>b){
			d = c;
			c = b;
			b = a;
		}
		else if (a > c){
			d = c;
			c = a;
		}
		else if (a > d){
			d = a;
		}
	}
	cout << b << endl << c << endl << d;
	return 0;
}

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