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<iostream>
using namespace std;
int main(){
        int heights[10];
        for (int i = 0; i < 10; i++){
                cin>>heights[i];
        }
        int t3[3];
        for (int i = 0; i < 3; i++){
                t3[i]=0;
        }
        for (int i = 0; i < 10; i++){
                if(heights[i] > t3[0]){
                        t3[2] = t3[1];
                        t3[1] = t3[0];
                        t3[0] = heights[i];
                }else if (heights[i] > t3[1]){
                        t3[2] = t3[1];
                        t3[1] = heights[i];
                }else if (heights [i] > t3[2]){
                        t3[2] = heights[i];
                }
        }
        for (int i = 0; i < 3; i++){
                cout<<t3[i]<<"\n";
        }
        return 0;
}

C++: #include <stdio.h>

int main(void){
	int mt[10];

	for(int i=0; i<10; i++){
		do{
			scanf("%d", &mt[i]);
		}while(mt[i]<1 && mt[i]>10000);
	}

	for(int i=0; i<9; i++){
		for(int j=i; j<10; j++){
			int tmp;
			if(mt[i]<mt[j]){
				tmp = mt[i];
				mt[i] = mt[j];
				mt[j] =tmp;
			}
		}
	}

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

	return 0;
}

C++: #import<algo.h>
main(){int i=0,h[10];for(;i<10;)cin>>h[i++];sort(h,h+10);for(i=9;i>6;)cout<<h[i--]<<endl;exit(0);}

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

int main()
{
	vector<int> heights;
	for (int i = 0; i < 10; i++) {
		int height;
		cin >> height;
		heights.push_back(height);
	}
	sort(heights.rbegin(), heights.rend());
	for (int i = 0; i < 3; i++) {
		cout << heights[i] << endl;
	}
}

C++: #include <iostream>
#include <iomanip>
#include <cmath>

using namespace std;


void sort(int *height, int num){
  int max=0;
  int tmpi;
  for(int i=0;i<num;i++){
    if(max<height[i]){
      max = height[i];
      tmpi = i;
    }
  }

  //  cout << "max: " << max << endl;
  
  //i??¨num?????????
  int tmp = height[num-1];
  height[num-1] = height[tmpi];
  height[tmpi] = tmp;
}

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

  sort(height, 10);
  sort(height, 9);
  sort(height, 8);

  //  cout << endl;
  
  for(int i=9;i>6;i--){
    cout << height[i] << endl;
  }


  
}

C++: #include <stdio.h>
int main(){

  int m[10],i,j,blank;

  for(i = 0; i < 10; i++) scanf("%d",&m[i]);

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

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

      if(m[j] > m[j+1]){

        blank=m[j];
        m[j]=m[j+1];
        m[j+1]=blank;

      }

    }

  }

  printf("%d\n%d\n%d\n",m[9],m[8],m[7]);

  return 0;

}

C++: #include<stdio.h>
#include<algorithm>
#include<iostream>
using namespace std;         
int main(void){
    /* 宣言と初期化 */
    int hai[10];
    int id[2];
    int i;
    int temp2nd;
    int temp3rd;
    int tempmax;
             
for(i=0;i<10;i++)
{
   cin >> 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;

using ll = long long;

int main(void) {
    vector<int> arr(10);
    for (int i = 0; i < 10; i++)
        scanf("%d", &arr[i]);
    sort(arr.rbegin(), arr.rend());
    printf("%d\n%d\n%d\n", arr[0], arr[1], arr[2]);
    return 0;
}

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

C++: #include <iostream>
#include <string>   
using namespace std;
 
int main(){
int rank[3],a[10],i = 0,ii = 0,b,c;
rank[0] = 0;
rank[1] = 0;
rank[2] = 0;
while(i <= 9){
	cin >> a[i];
	while(ii <= 2){
		if(rank[ii] < a[i]){
			b = 2 - ii;
			c = ii;
			while(c >= 1){
				c--;
				rank[c] = rank[c-1];
			}			
			rank[ii] = a[i];

			break;	
		}
		ii++;
	}
i++;
ii = 0;

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




}

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

int main(){
int h[10];

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

a=0;
for(i=0; i<10; i++){
if(h[a]<h[i]) a=i;
}
cout << h[a] << endl;

h[a]=0;
a=0;
for(i=0; i<10; i++){
if(h[a]<h[i]) a=i;
}
cout << h[a] << endl;
h[a]=0;
a=0;
for(i=0; i<10; i++){
if(h[a]<h[i]) a=i;
}
cout << h[a] << endl;

return 0;
}

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

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

	for( int j = 0; j < 10; j++ ) {
		for ( int i = 0; i < 10-1; i++ ) {
			if( mt[ i ] < mt[ i+1 ] ) {
				int tmp = mt[ i+1 ];
				mt[ i+1 ] = mt[ i ];
				mt[ i ] = tmp;
			}
		}
	}

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

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

C++: 

#include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>

#define LLI long long
#define LLU unsigned long long
#define pi 2*acos(0.0)

#define scan(x) scanf("%d",&x)


int dir[8][2]={{-1,0}
              ,{1,0}
              ,{0,-1}
              ,{0,1}
              ,{-1,-1}
              ,{-1,1}
              ,{1,-1}
              ,{1,1}};


using namespace std;


int main()
{
    int mou[10];
    for(int i=0 ;i < 10 ; i++)
    {
        scan(mou[i]);
    }

    sort(mou,mou+10);

    printf("%d\n%d\n%d\n",mou[9],mou[8],mou[7]);

	return 0;
}

C++: #include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <vector>
#include <algorithm>
#include <utility>
#include <queue>
int n;
using namespace std;
int main(){
	std::ios::sync_with_stdio(false);
	priority_queue <int > dp;

	while(cin>>n){
		dp.push(n);
	}
	for(int i=0;i<3;i++){
		int output=dp.top();
		dp.pop();
		cout<<output<<"\n";
	}
	return 0;
}

C++: #include <iostream>

using namespace std;

int main()
{
    int first=0,second=0,third=0;
    int moun[10];
    for(int i=0;i<10;i++){
        cin >> moun[i];
    }
    for(int i=0;i<10;i++){
        first<moun[i] ? first=moun[i]:first;
    }
    cout << first << endl;
    for(int i=0;i<10;i++){
        second<moun[i] && moun[i]<first ? second=moun[i]:second;
    }
    cout << second << endl;
    for(int i=0;i<10;i++){
        third<moun[i] && moun[i]<second ? third=moun[i]:third;
    }
    cout << third << endl;
    return 0;
}