Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
	"strconv"
)

var (
	n  = 10
	sc = bufio.NewScanner(os.Stdin)
)

func main() {
	heights := make([]int, n, n)
	for i := 0; i < n; i++ {
		sc.Scan()
		heights[i], _ = strconv.Atoi(sc.Text())
	}
	sort.Sort(sort.Reverse(sort.IntSlice(heights)))

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

C++: #include <iostream>

int main()
{
  int best[] = {0, 0, 0};
  int t;
  for(int i = 0; i < 10; ++i)
  {
    std::cin << t << std::endl;
    for(int j = 0; j < 3; ++j)
    {
      if(t > best[j])
      {
        for(int k = 3; k > j; --k)
          best[k] = best[k - 1];
        best[j] = t;
      }
    }
    for(int i = 0; i < 3; ++i)
      std::cout << best[j] << std::endl;
  }
  return 0;
}

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

using namespace std;

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

        max_heignt[0] = max(height, max_heignt[0]);
        max_tmp = max(max_heignt[0], max_heignt[1]);
        for(int j=0;j<2;j++){
            max_tmp = max(max_heignt[j], max_heignt[j+1]);
            min_temp = min(max_heignt[j], max_heignt[j+1]);
            max_heignt[j] = min_temp;
            max_heignt[j+1] = max_tmp;
        }
    }

    for (int i = 3; i > 0; i--){
        cout << max_heignt[i-1] << endl;
    }
    
    return 0;
}

C++: #include <stdio.h>

int main(void)
{
	int m[10];
	int max1 = 0, max2 = 0, max3 = 0;
	int i;
	
	for (i = 0; i < 10; i++){
		scanf("%d", &m[i]);
	}
	
	for (i = 0; i < 10; i++){
		if (max1 <= m[i]){
			/*max1 = m[i];
			max2 = max1;*/
			max3 = max2;
			max2 = max1;
			max1 = m[i];
			
		}
	}
	
	printf("%d\n%d\n%d\n", max1, max2, max3);
	
	return (0);
}

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

using namespace std;

int main() {
    vector<int> container;

    string buff;
    for(int i = 0; i < 10; ++i){
        getline(cin, buff);
        stringstream ss;
        ss << buff;

        int height = 0;
        ss >> height;

        container.push_back(height);
    }

    sort(
         container.begin(),
         container.end(),
         [](int n1, int n2) -> bool {
            return (n1 > n2);
         }
    );

    for(int i = 0; i < 3; ++i)
        cout << container[i] << endl;

    return 0;
}

C++: #include<iostream>
#include<string>
#include<cmath>
#include<queue>
#include<map>
#include<set>
#include<list>
#include<iomanip>
#include<vector>
#include<functional>
#include<algorithm>
#include<cstdio>
using namespace std;
int main(){
	int a[10];
	for(int i=0;i<10;i++){
		cin>>a[i];
	}
	sort(a,a+10);
	reverse(a,a+10);
	cout<<a[0]<<endl;
	cout<<a[1]<<endl;
	cout<<a[2]<<endl;
}

C++: #include <stdio.h>

int main(){

	int a[10];
	int temp = 0;

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

	for(int i=0; i<9; i++){
		for(int j=9; j>i; j--){
			if(a[j-1] < a[j]){
				temp = a[j];
				a[j] = a[j-1];
				a[j-1] = temp;
			}
		}
	}

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

C++: #include <bits/stdc++.h>
using namespace std;

int main() {
  vector<int> h(10);
  for (int i = 0; i < 10; i++) {
    cin >> h[i];
  }
  sort(begin(h), end(h), greater<int>());
  for (int i = 0; i < 3; i++) {
    cout << h[i] << endl;
  }
}

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

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

C++: #include<stdio.h>

int main(){
  int n[10];
  int i;
  for(i=0;i<10;i++){
    scanf("%d", &n[i]);
  }
  int max1=0;
  int i1=0;
  int max2=0;
  int i2=0;
  int max3=0;
  int i3=0;
  
  for(i=0;i<10;i++){
    if (max1 < n[i])
      {max1 = n[i];i1=i;}
  }
   
  for(i=0;i<10;i++){
    if (max2 < n[i] && i!=i1)
      {max2 = n[i];i2=i;}
  }

  for(i=0;i<10;i++){
    if (max3 < n[i] && i!=i1 && i!=i2)
      {max3 = n[i];i3=i;}
  }

  //printf("%d\n%d\n%d\n", i1, i2, i3);
  printf("%d\n%d\n%d\n", max1, max2, max3);
}

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

int main(){
  int height[10];
  for(int i=0;i<10; i++){
    cin >> height[i];
  }
  for(int j=0;j<3;j++){
  int max=height[0];
  int number = 0;
    for(int i=0;i<10; i++){
      if(max < height[i]){
        max = height[i];
        number = i;
      }
    }
    cout << max << endl;
    height[number] = 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 + 10);
	cout << a[9] << endl;
	cout << a[8] << endl;
	cout << a[7] << endl;
	return 0;
}

C++: #include<iostream>  
#define element 10  
  
using namespace std;  
  
int height[element];  
int number;  
int main()  
{  
 for(int i=0;i<element;++i)  
 {  
  cin >> height[i];  
 }  
 for(int i=0;i<element;++i)  
 {  
  for(int j=i;j<element;++j)  
  {  
   if(height[i]<height[j])  
   {  
    number = height[i];  
    height[i] = height[j];  
    height[j] = number;  
   }  
  }  
 }  
 printf("\n%d\n%d\n%d\n",height[0],height[1],height[2]);  
 return 0;  
}

C++: #include<iostream>
using namespace std;
int main()
{
	int mhr[20],i,j,c;
	for(i=1; i<=10; i++)
	{
		cin >> mhr[i];
	}
	for(i=1; i<=10; i++)
	{
		for(j=i+1; j<=10; j++)
		{
			if(mhr[i]<mhr[j])
			{
				c=mhr[i];
				mhr[i]=mhr[j];
				mhr[j]=c;
			}

		}
	}
	for(i=1; i<=3; i++)
	{
		cout << mhr[i] << endl;
	}

    return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;

int N = 10, A[11];


signed main()
{
    for(int i = 0; i < N; i++){
        cin >> A[i];
    }
    sort(A, A + N);
    for(int i = N - 1; i >= N - 3; i--){
        cout << A[i] << endl;
    }

    return 0;
}

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

int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    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 <iostream>
#include <queue>
 
int main(){
    std::priority_queue<u_int> heights;
     
    for (u_int h, i = 0; i < 10; ++i){
        std::cin >> h;
        heights.push(h);
    }
     
    for (u_int i = 0; i < 3; ++i){
        std::cout << heights.top() << std::endl;
        heights.pop();
    }
	
    return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;

int h[9]

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

  sort(h, h+10, greater<int>());

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

  return 0;
}

C++: #include<stdio.h>

int main()
{
	int mth[] = { 1819, 2003, 876, 2840, 1723, 1673, 3776, 2848, 1592, 922 };
	int topthree[] = { 0, 0, 0 };
	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>
using namespace std;

int main(){
    int tinggi[100];
    int i, j, temp;

    for(i=0; i<10; i++){
        cin>>tinggi[i];
    }
    for(j=0; j<10; j++){
            for(i=0; i<10; i++){
                if(tinggi[i] > tinggi[i-1]){
                    temp = tinggi[i];
                    tinggi[i] = tinggi[i-1];
                    tinggi[i-1] = temp;
                }
        }
    }
    for(i=0; i<3; i++){
        cout<<tinggi[i]<<endl;
    }

    return 0;
}