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>
using namespace std;

int main() {
	int first, second, third;
	first=0;
	second=0;
	third=0;
	int i;
	for(i=1;i<=10;i++){
		if(height of mountain i > third){
			if(height of mountain i > second){
				if(height of mountain i > first){
					first=i;
				}else{
					second=i;
				}
			}else{
				third=i;
			}
		}
	}
	cout << first << endl;
	cout << second << endl;
	cout << third << endl;
	return 0;
}

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

int main(){
  int m, m1 = 0, m2 = 0, m3 = 0;
  for(int i=0;i<10;i++){
    cin >> m;
    if(m > m1){
      m3 = m2;
      m2 = m1;
      m1 = m;
    }else if(m > m2){
      m3 = m2;
      m2 = m;
    }else if(m > m3){
      m3 = m;
    }
  }
  cout << m1 << endl;
  cout << m2 << endl;
  cout << m3 << endl;
  return 0;
}

C++: #include<iostream>

using namespace std;

int main() {
	int top[5]={0,0,0,0,0};
	int yama;

	cin >> top[0];
	for(int i=0; i<9; i++){
		cin >> yama;
		
		for(int j=0; j<3; j++){
			if(yama >top[j]){
				top[j+2] = top[j+1];
				top[j+1] = top[j];
				top[j] =yama;
				break;
			}
		}
	}
	for(int i=0; i<3; i++)
		cout << top[i] << endl;

	return 0;
}

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

using namespace std;

#define rep(i, n) for (int i = 0; i < int(n); ++i)

int main() {
  int a[10];
  rep (i, 10) cin >> a[i];
  sort(a, a+ 10, greater<int>());
  cout << a[0] << endl;
  cout << a[1] << endl;
  cout << a[2] << endl;
  return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <string>
#include <stack>
#include <queue>
#include <set>
using namespace std;

int main()
{
	int a = 0 , s=0, d=0, f=0, g=0, h=0, j=0, k=0, l=0, z=0;
	cin >> a, s, d, f, g, h, j, k, l, z;
	int i[10] = { a, s, d, f, g, h, j, k, l, z };
	sort(i, i + 10);
	cout << i[10] << endl;
	cout << i[9] << endl;
	cout << i[8] << endl;

	
	return 0;
}

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

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




}

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

using namespace std;

int main(){
	int a[10],i=0;
	for(;i<10;i++)scanf("%d",&a[i]);
	sort(a,a+10);
	for(i=0;i<3;i++)pritnf("%d\n",a[i]);
	return 0;
}

C++: #include <bits/stdc++.h>
#define LL long long
#define rep(i,n) for (int i=0;i<(n);i++)
//#define rep(i,x,n) for (int i=x;i<(n);i++)
using namespace std;
int main(){
	
	cin.tie(0);
	ios::sync_with_stdio(false);
	
	int n;
	vector<int> vc;
	while(cin >> n){
		vc.push_back(n);
	}
	sort(vc.begin(), vc.end(), greater<int>());
	rep(i, 3){
		cout << vc[i] << endl;
	}
	return 0;
}

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

int main() {
  std::cin.tie(0);
  std::ios::sync_with_stdio(false);

  int i, input;
  vector<int> heights;
  for (i = 0; i < 10; i++) {
    cin >> input;
    heights.push_back(input);
  }

  sort(heights.rbegin(), heights.rend());
  cout << heights.at(0) << endl;
  cout << heights.at(1) << endl;
  cout << heights.at(2) << endl;

  return 0;
}

C++: #include <stdio.h>
const int N = 15;

int main()
{
	int a[N]={0};
	for(int i = 0; i <= 9; i++)
	{
		scanf("%d", &a[i]);
	}
	for(int i = 0; i <= 9; i++)
	{
		for(int j = i; j <= 9; j++)
		{
			if(a[i] < a[j])
			{
				int tmp = a[i];
				a[i] = a[j];
				a[j] = tmp;
			}
		}
	}
	for(int i = 0; i < 3; i++)
	{
		printf("%d\n", a[i]);
	}
	
	return 0;
}

C++: #include <stdio.h>

int main(){
  int a[10], max, maxidx;
  for(int i=0; i<=9; i++){
    scanf("%d", &a[i]);
  }
  for(int j=0; j<3; j++){
    max = -1;
    for(int i=0; i<=9; i++){
      if(a[i] > max){
	max = a[i];
	maxidx = i;
      }
    }
    printf("%d\n", max);
    a[maxidx] = -1;
  }
}

C++: #include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
using namespace std;
typedef long long ll;
typedef vector<int> vint;
typedef pair<int, int> pint;
#define MOD 1000000007 //10^9+7
#define INF 1000000000 //10^9

int main (int argc, const char * argv[])
{
    vector<int> m;
    int n;
    for (int i=0; i<10; i++) {
        cin>>n;
        m.push_back(n);
    }
    sort(m.begin(), m.end(),greater<int>() );
    for (int i=0; i<3; i++) {
        cout<<m[i]<<endl;
    }
    return 0;
}

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

using namespace std;

int main() {
	int m[10];

	for (int i = 0; i < 10; i++)cin >> m[11];

	sort(m, m + 10);

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

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

using namespace std;

int main(){

  int h[20];
  int n=0;

  while(cin>>h[n]){
    n++;
  }

  sort(h,h+n);

  cout << h[n-1] <<endl<< h[n-2]<< endl <<h[n-3]<<endl;
  
  
  return 0;
}

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

const static int MAX = 10000;

int main() {
int R[MAX]={0};
int i;

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

for (int j=MAX - 1; j>0 ; j--){
int cnt = 0;

if  (cnt <= 3) break;

if (R[j] != 0){
cout << R[i] << endl;
cnt++;
}
return 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());
	for (int i=0; i<3; i++) cout << v[9-i] << endl;
	return 0;
}

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

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

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

int main(){
  int mountain[10] = {};

  for(int i=0;i<10;i++){
    scanf("%d",&mountain[i]);
  }
  sort(mountain,mountain+10,greater<int>());
  for(int i=0;i<3;i++){
    printf("%d\n",mountain[i]);
  }


  return 0;
}

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

int main() {

	int mountain[10];
	for (int i = 0; i < 10; i++)
		cin >> mountain[i];
	sort(mountain,mountain+10);
	for(int i=9;i>=7;i--)
	cout << mountain[i] << endl;

	return 0;

}

C++: #include <stdio.h>

int main ()
{
	int input[10];
	
	for (int i = 0; i < 10; i++)
		scanf ("%d", &input[i]);
		
	for (int i = 0; i < 10; i++)
	{
		for (int j = i + 1; j < 10; j++)
		{
			if (input [j] > input[i])
			{
				int swap = input[i];
				input[i] = input[j];
				input[j] = swap;
			}
		}
	}
	
	for (int i = 0; i < 3; i++)
		printf ("%d\n", input[i]);
		
	return 0;
}