Go: package main

import "fmt"

func main() {
	var height int
	topHeights := [5]int{}

	for i := 0; i < 10; i++ {
		fmt.Scan(&height)

		for j := 0; j < 3; j++ {
			if topHeights[j] < height {
				topHeights[j+2] = topHeights[j+1]
				topHeights[j+1] = topHeights[j]
				topHeights[j] = height
				break
			}
		}
	}

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

C++: #include <stdio.h>

int main(void){
  int yama[10];
 
  //山の値を１０個入力する
  for(int i = 0; i < 10; i++){
    scanf("%d", &yama[i]);
  }

  //ソートする
  for(int i = 0; i < 9; i++){
    for(int j = 0; j < 9; j++){
      if(yama[j] < yama[j+1]){
	int a = yama[j+1];
	yama[j+1] = yama[j];
	yama[j] = a;
      }
    }
  }

  //値を出力
  for(int i = 0; i < 3; i++){
    printf("%d\n", yama[i]);
  }

  return 0;


}

C++: #include<iostream>
#include<string>
#include<cmath>
#include<algorithm>
using namespace std; 
int main(){
  int a[10]={};  
  for(int i=1;i<=10;i++){
    cin>>a[i];
  }
 
  sort(a,a+10);
    cout<<a[9]<<endl;
  cout<<a[8]<<endl;
  cout<<a[7]<<endl;

  return 0;
}

C++: #include<iostream>
#include <list>
using std::cout;
using std::cin;
using std::endl;
int main()
{
	short t = 10;
	int a;
	std::list<int> v;
	while (t --)
	{
		cin >> a;
		v.push_back(a);
	}
	v.sort();
	std::list<int>::const_iterator le = v.end();
	t = 3;
	while (t--)
	{
		--le;
		cout << *le << endl;
	}
	return 0;
}

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

int main(){
  vector<int> v;
  int n;
  
  while(cin>>n){
    v.push_back(n);
  }

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

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

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

int main()
{
    int* h = new int[10];

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

    int tmp;
    for(int j=0; j<9; j++){
        for(int k=0; k<9; k++){
         if(h[k] < h[k+1]){
                tmp = h[k];
                h[k] = h[k+1];
                h[k+1] = tmp;
            }
        }
    }

    cout << h[0] << endl;
    cout << h[1] << endl;
    cout << h[2] << endl;
}

C++: #include<cstdio>
#include<algorithm>
using namespace std;
int main(void){
    int h[10],i;

    for(i=0;i<10;i++){
	scanf("%d",&h[i]);
    }
    sort(h,h+10);
    printf("%d\n%d\n%d\n",h[9],h[8],h[7]);
    
    return 0;
}

C++: #include<stdio.h>

int main()
{
	int mth[10];
	int topthree[3] = {0};

	for (int i = 1; i <= 10;){
		scanf("%d", &mth[i - 1]);
		if (0 <= mth[i - 1] && mth[i - 1] <= 10000)
			i++;
	}
	for (int i = 0; i <= 9; i++){
		if (topthree[0] <= mth[i]){
			topthree[2] = topthree[1];
			topthree[1] = topthree[0];
			topthree[0] = mth[i];
		}
		else if (topthree[1] <= mth[i]){
			topthree[2] = topthree[1];
			topthree[1] = mth[i];
		}
		else if (topthree[2] <= mth[i]){
			topthree[2] = mth[i];
		}
	}
	for (int i = 0; i <= 2; i++){
		printf("%d\n", topthree[i]);
	}
	return 0;
}

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

}

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

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

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

int compare(const void* a, const void* b){return *((int*)b)-*((int*)a);}

int main(){
	int hight[10];
	for(int i =0;i<=9;i++) cin >> hight[i];
	qsort(hight,10,sizeof(int),compare);
	for(int i = 0;i<=2;i++) cout << hight[i] << endl;
	return 0;
	}

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

int main()
{
    int in;
    vector<int> v;
    while(cin >> in)
    {
        v.push_back(in);
    }
    sort(v.begin(), v.end(), greater<int>());
    for(auto num : v)
        cout << num << endl;
}

C++: #include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < n; i++)
const int    INF = 100000000;
const double EPS = 1e-10;
const int    MOD = 1000000007;
using namespace std;
typedef pair<int,int> P;

int main(){
	int x[10];
	rep(i,10) cin >> x[i];
	sort(x,x+10,greater<int>());
	rep(i,3) cout << x[i] << endl;
}

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

using namespace std;

int main(void) {
        int i;
        int height_of_mountain[10];

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

        sort(height_of_mountain, height_of_mountain+10);

        cout << height_of_mountain[9] << endl;
        cout << height_of_mountain[8] << endl;
        cout << height_of_mountain[7] << endl;

        return 0;
}

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

C++: 
#include<stdio.h>
void sort(int *a,int n)
{
int k,i,j;
for(i=0;i<n-1;i++)
{
for(j=i+1;j<n;j++)
{
if(a[i]<a[j])
{
k=a[i];
a[i]=a[j];
a[j]=k;
}
}
}
return ;
}
int main()
{
int a[10];
int i;
for(i=0;i<10;i++)
{
scanf("%d",&a[i]);
}

sort(a,10);

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

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

int main()
{
	int highth[10] = { };
	int buf;

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

	for (int i = 0; i < 10; i++){
		for (int j = 0; j < 10; j++){
			if (highth[j] < highth[j + 1]){
				buf = highth[j + 1];
				highth[j + 1] = highth[j];
				highth[j] = buf;
			}
		}
	}

	cout << highth[0] << endl;
	cout << highth[1] << endl;
	cout << highth[2] << endl;
}

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 + 10);
  cout << a[9] << "\n" << a[8] << "\n" << a[7] << "\n";
  return 0;
}

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

C++: #include <iostream>
#define N 10
using namespace std;
int main()
{
	int p[N];
	for (int i=0;i<N;i++)
		cin>>p[i];
	for (int n=0;n<N-1;n++)
		for (int m=n+1;m<N;m++)
			if (p[n]<p[m])
			{
				int temp=p[n];
				p[n]=p[m];
				p[m]=temp;
			}
			for (int k=0;k<3;k++)
				cout<<p[k]<<endl;
	return 0;
}