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>
#include <algorithm>
#include <stdio.h>
#define pri(dt) printf("%d\n",dt)
#define RPE0(loopTotal)  for(int i=0;i<=(loopTotal);i++)
#define RPE(loopTotal)  for(int i=1;i<=(loopTotal);i++)

int data[9];

using namespace std;
int main(void){
    
    RPE(4){
    
    RPE0(9) scanf("%d",&data[i]);
    sort(data,data+9,greater<int>());
    RPE0(2) pri(data[i]);
    data[9] = {};
    }
}

C++: #include <iostream>

int main(){
	int first=0,second=0,third=0,height;
	for(int i=0;i<10;++i){
		cin>>height;
		if(height>first){
			second=first;
			first=height;
		}
		else if(height>second){
			third=second;
			second=height;
		}
		else if(height>third){
			third=height;
		}
	}
	std::cout<<first<<'\n'<<second<<'\n'<<third<<'\n';
	return 0;
}

C++: #include <iostream>
#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>
using namespace std;

int main()
{
    
    int i = 0,m[10];
    
    while(i<10){
        cin >> m[i];
        i++;
    }
    
    int max,index,j;
   
    for(j = 0;j < 3 ; j++){
        max = m[0];
        index = 0;
        for(i = 0; i < 10 ;i++){
            if(max < m[i])
            {
                max = m[i];
                index = i;
            }
        }
        cout << m[index] << endl;
        m[index] = 0;
    }
}

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

int main(){
	int m,max=0,cen=-1,min=-2;
	cin >> m;
	max=m;
	cen=-1;
	min=-2;
	for(int i=1;i<10;i++){
		cin >> m;
		if(max<m){
			min=cen;
			cen=max;
			max=m;
		}
		else if(cen<=m){
			min=cen;
			cen=m;
		}
		else if(min<=m) min=m;
	}
	cout << max << endl;
	cout << cen << endl;
	cout << min << endl;

		return 0;
}

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

C++: #include<iostream>
using namespace std;
int main()
{
	int i, j, t, a[10];
	for (i = 0; i < 10;i++)
		cin >> a[i];
	for (j = 0; j <9; j++)
	for (i = 0; i < 9 - j; i++)
	if (a[i] < a[i + 1])
	{
		t = a[i]; a[i] = a[i + 1]; a[i + 1] = t;
	}
	cout << a[0];
	cout << "\n";
	cout << a[1];
	cout << "\n";
	cout << a[2];
	cout << "\n";
	cout << endl;
	return 0;
}

C++: #include <iostream>
#include <string>
#include <cctype>
#include <cmath>
#include <stdio.h>
#include <algorithm>
#include <vector>
#include <map> // pair
#include <set>
#define MAXSIZE 200000
#define PI 3.141592653589
using namespace std;

template<typename T>
T add(T a,T b){
  return a+b;
}

namespace A
{
  int f(void){
    return 1;
  }
}

int main(){

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

  sort(height,height+10);
  reverse(height,height+10);
  for(int i=0;i<3;i++){
    std::cout << height[i] << '\n';
  }

}

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

	return 0;
}

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

int main(){
	int n[10];
	int rank[3] = {0,0,0};
	
	for(int i=0 ; i<10 ; i++){
		cin >> n[i] ; 
	}
	
	for(int i=0 ; i<10 ; i++){
		if(rank[0] < n[i]){
			rank[2] = rank[1];
			rank[1] = rank[0];
			rank[0] = n[i];
		}
		else if(rank[1] < n[i]){
			rank[2] = rank[1];
			rank[1] = n[i];
		}
		else if(rank[2] < n[i]){
			rank[2] = n[i];
		}
	}

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

	return 0;
}

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

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

using namespace std;

int main(){
  int n;
  int mount[10]={};

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

  for(int i=9;i > 6;i--){
    
    cout << mount[i] << " ";
  }
  cout << endl;
  
  return 0;
}

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

using namespace std;

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

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

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

C++: #include<stdio.h>

int main()

{
    int height[15],i,j,temp;

    for(i=0;i<10;i++)
        scanf("%d",& height[i]);
    for(i=0;i<10;i++)
    {
        for(j=i+1;j<10;j++)
        {
            if(height[i]>height[j]){

                temp=height[j];
                 height[j]=height[i];
                 height[i]=temp;

            }
        }
    }
      for(i=9;i>6;i--)
      {
          printf("%d\n",height[i]);

      }
    return 0;
}

C++: int main(){
int a[10];
int max = 0;
int max2 = 0;
int max3 = 0;
int i;
int tmp;

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

for(i = 0; i< 10; i++){
if(max < a[i]){
max = a[i];
tmp = i;
}
}


int tmp2;
for(int i = 0; i< 10; i++){
if(max2 < a[i] && tmp != i){

 max2 = a[i];
tmp2 = i;
}
}
for(i = 0; i< 10; i++){
if(max3 < a[i]&& tmp != i&& tmp2 != i) max3 = a[i];
}

std::cout << max<< std::endl;
std::cout << max2<< std::endl;
std::cout << max3<< std::endl;



	return 0;
}

C++: #include<iostream>

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 x[10],tmp,i,j;

  for(i=0; i<10; ++i)
    cin >> x[i];

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

  for(i=0; i<3; ++i)
    cout << x[i] << "\n";

    return 0;
}