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>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <algorithm>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <sstream>
#include <complex>
#include <ctime>
#include <cassert>

using namespace std;

typedef long long ll;
typedef vector<int> VI;
typedef pair<int,int> PII;

#define REP(i,s,t) for(int i=(s);i<(t);i++)
#define FILL(x,v) memset(x,v,sizeof(x))

const int INF = (int)1E9;
#define MAXN 100005


int main(){
	int h[10];
	REP(i,0,10) cin >> h[i];
	sort(h,h+10,greater<int>());
	REP(i,0,3) printf("%d\n", h[i]);
	return 0;
}

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

using namespace std;
int main(){
  int b[10];
  int a;
  for(int i=0; i < 10; i++){
    cin >> a;
    b[i] = a;
  }
  sort(b,b+10);
  for(int j=10; j > 7; j--){
    cout  << b[j-1]  << endl;
  }
}

C++: #include<stdio.h>
int main(void) {
	int i, mountain[10];
	int n = 0;
	int l = 0;
	int m = 0;
	for (i = 0;i < 10;i++) {
		scanf("%d", &mountain[i]);
	}
	for (i = 0;i < 10;i++) {
		if (mountain[i] > m) m = mountain[i];
	}
	printf("%d\n", m);
	for (i = 0;i < 10;i++) {
	if (mountain[i] > n && mountain[i] != m) n = mountain[i];
	}
	printf("%d\n", n);
	for (i = 0;i < 10; i++) {
		if (mountain[i] > l && mountain[i] != m && mountain[i] != n) l = mountain[i];
	}
	printf("%d\n", l);

	return 0;
}

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

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

C++: #include<iostream>
#include<queue>
using namespace std;
priority_queue<int> q1;
int main(){
	int i,j;
	for(i=0;i<10;i++){
		cin>>j;
		q1.push(j);
	}
	for(i=0;i<3;i++){
		cout<<q1.top()<<endl;
		q1.pop();
	}
	return 0;
}

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

int main()
{
    
    int i = 10,m[10];
    
    while(i>0){
        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>
#include <vector>
#include <algorithm>
using namespace std;

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

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

priority_queue<int> q;

int main(){
	int n;
	while(cin>>n) q.push(n);
	cout<<q.top()<<endl;
	q.pop();
	cout<<q.top()<<endl;
	q.pop();
	cout<<q.top()<<endl;
	return 0;
}

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

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

C++: #include<stdio.h>

int main(void)
{
	int x,y;

	for(x=1;x<=9;x++)
	{
		for(y=1;y<=9;y++)
		{
			printf("%dx%d=%d\n",x,y,x*y);
		}
	}
	return 0;
}

C++: #include <iostream>

int main()
{
        uint16_t* height;
        height=new uint16_t [10];
        for(uint8_t i=0;i<10;i++)
                std::cin>>height[i];
        for(uint8_t i=0;i<10;i++)
                for(uint8_t j=i;j<10;j++)
                        if(height[i]<height[j])
                        {
                                uint16_t buf=height[i];
                                height[i]=height[j];
                                height[j]=buf;
                        }
        std::cout<<height[0]<<std::endl<<height[1]<<std::endl<<height[2]<<std::endl;
        delete(height);

        return 0;
}

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

int main(void)
{
    int a;
    int b[10];
    for (int i = 0; i < 10; i++)
    {
        cin >> a;
        if(a>=b[0])
        {
            b[2] = b[1];
            b[1] = b[0];
            b[0] = a;
        }
        else if(a>=b[1])
        {
            b[2] = b[1];
            b[1] = a;
        }
        else if(a>=b[2])
        {
            b[2] = a;
        }

    }

    for (int i = 0; i < 3; i++)
    {
        cout << b[i] << "\n";
    }
}

C++: #include <iostream>
#include <cstdlib>
#include <fstream>

int main(int argc, char *argv[]){
	//	std::ifstream datafile(argv[1]); //input datafile
	std::string str;
	int mt_height[10] = {}; //height of mountain
	int ans[3] = {}; // top 3 height of mountain. 0 -> no.1 1 -> no.2 2 -> no.3

	if(datafile.fail()){
		std::cout << "error : can't open this file." << std::endl;
		exit(1);
	}

	//input 10 height of mountain
	for(size_t i = 0; i < 10; i++){
		std::getline(std::cin, str);
		sscanf(str.c_str(), "%d", &mt_height[i]);

		if((mt_height[i] < 0) || (mt_height[i] > 10000)){
			std::cout << "error : out of constraints" << std::endl;
			exit(1);
		}
	}

	//select top 3 height of mountain and sort ans[]
	for(size_t i = 0; i < 10; i++){
		if(ans[0] < mt_height[i]){
			ans[2] = ans[1];
			ans[1] = ans[0];
			ans[0] = mt_height[i];
		}else if(ans[1] < mt_height[i]){
			ans[2] = ans[1];
			ans[1] = mt_height[i];
		}else if(ans[2] < mt_height[i]){
			ans[2] = mt_height[i];
		}
	}

	//output ans[]
	for(size_t i = 0; i < 3; i++){
		std::cout << ans[i] << std::endl;
	}

	return 0;
}

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

int main(){
int a[10] = {1819,2003,876,2840,1723,1673,3776,2848,1592,922};
int ma=0, aa=0;

for(int j=0;j<3;j++){
for(int i=0;i<10;i++){
if(ma < a[i]){
ma = a[i];
aa = i;
}
}
cout << ma << endl;
a[aa] = 0;
ma = 0;
}

return 0;
}

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

using namespace std;

int main(){
	int M[10];
	for(int i = 0; i < 10; i++){
		cin >> M[i];
	}
	sort(M, M + 10);
	reverse(M, M + 10);
	cout << M[0] << "\n";
	cout << M[1] << "\n";
	cout << M[2] << "\n";
	return 0;
}

C++: #include<stdio.h>
#include<string.h>

main(void){
    int num[10], i, high1 = 0, high2 = 0, high3 = 0;
    
    for( i = 0; i < 10; i++){
        scanf("%d", &num[i]);
        if( num[i] >= high1){
            high3 = high2;
            high2 = high1;
            high1 = num[i];
        }else if( num[i] >= high2){
            high3 = high2;
            high2 = num[i];
        }else if(num[i] >= high3){
            high3 = num[i];
        }
    }
    
    printf("%d\n%d\n%d\n", high1, high2, high3);

    return 0;
}