Go: package main

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

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	counter := 0
	var mountain []int
	for scanner.Scan() {
		i, err := strconv.Atoi(scanner.Text())
		if err != nil {
			break
		}
		mountain = append(mountain, i)
		counter++
		if counter == 10 {
			break
		}

	}
	sort.Ints(mountain)
	fmt.Println(mountain[9])
	fmt.Println(mountain[8])
	fmt.Println(mountain[7])
}

C++: #include<iostream>

using namespace std;

int main() {
	int Mt[10];

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

	int cnt;
	do{
		cnt = 0;
		for (int j = 0; j < 9; j++) {
			if (Mt[j] < Mt[j + 1]) {
				int tmp = Mt[j];
				Mt[j] = Mt[j + 1];
				Mt[j + 1] = tmp;
				cnt++;
			}
		}
	} while (cnt != 0);

	for (int k = 0; k < 3; k++)
		cout << Mt[k] << endl;

	return 0;
}

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

int main() {

	unsigned int height[10];

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

	sort(height, height + 10);

	cout << height[9] << endl;
	cout << height[8] << endl;
	cout << height[7] << endl;

	return 0;
}

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

int main(){
	int suchi,high=0,middle=0,low=0,i,flag=0,a,b,c;
	
	for(i=0;i<10;i++){
		cin>>suchi;
			
		if(flag==0){
			high = suchi;
			flag++;
			}
			
		else{
			if(suchi<low)
			
			else if(suchi>=low&&suchi<middle)
				low = suchi;
			
			else if(suchi>=middle&&suchi<high){
				low = middle;
				middle = suchi;
			}
			
			else{
				low = middle;
				middle = high;
				high = suchi;
				}
				
			}
	}
	
	cout<<high<<endl;
	cout<<middle<<endl;
	cout<<low<<endl;
	
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main() {
  int h[10];
  for (int i = 0; i < 10; i++) {
    cin >> h[i];
  }
  sort(h, h+10);
  for (int i = 9; i >= 7; i--) {
    cout << h[i] << 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] || max2 <= m[i] || max3 <= 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>
using namespace std;
int main(){
int input[10];
int first;
int second;
int third;
for(int i=0,i<10,i++){
cin>>input[i];
if(first<input){first = input[i];}else 
if(second<input){second = input[i];}else 
if(third<input){third = input[i];}
}
cout<<first<<endl;
cout<<second<<endl;
cout<<third<<endl;
return 0;

}

C++: #include<stdio.h>
#include<algorithm>
using namespace std;
int main()
{
    int a[10],i;
    for(i=0;i<10;i++)
        scanf("%d",&a[i]);
    i--;
    sort(a,a+10);
    while(i>=7)
    {
        printf("%d\n",a[i]);
        i--;
    }
    return 0;
}

C++: #include<iostream>

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

C++: #include<iostream>
#include<algorithm>
#include<iterator>
#include<vector>
using namespace std;
int main(){

vector<int> v;

for(int i=0;i<10;i++){

int j;
cin>>j;
v.push_back(j);


}

sort(v.begin(),v.end());

cout<<v[9]<<endl<<v[8]<<endl<<v[7]<<endl;

}

C++: #include <iostream>
#include <cstdio>
#include <algorithm>
#include <cassert>
#include <vector>
#include <string>
#include <cmath>
#include <map> 
#include <sstream>
#include <cstdio>
#include <complex>
#include <cstring>
using namespace std;
 
const int MAX= 10000100;

#define loop(i,a,b) for(int i = a ; i < b ; i ++)
#define rep(i,a) loop(i,0,a)
#define all(a) (a).begin(),(a).end()
#define ll long long int
#define gcd(a,b) __gcd(a,b)
#define pb(a) push_back(a)
int GCD(int a, int b) {if(!b) return a; return gcd(b, a%b);}
int lcm(int a, int b) {return a*b / gcd(a, b);}

int main(void){
  int a[10];
  rep(i,10)cin>>a[i];
  sort(a,a+10,greater<int>());
  rep(i,3)cout<<a[i]<<endl;
}

C++: #include<iostream>
using namespace std;
void output(int ab,int bc,int ca);
int main() {
	int mountain[10];
	int a, b, c;

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

	a = mountain[0];
	b = mountain[1];
	c = mountain[2];

	for (int y = 3; y <= 9; y++) {
		if (a <= b) {
			if (a <= c) {
				if (a < mountain[y]) {
					a = mountain[y];
				}
			}
			else {
				if (c < mountain[y]) {
					c = mountain[y];
				}
			}
		}
		else if (b <= c)
		{
			if (b < mountain[y]) {
				b = mountain[y];
			}
		}
	}
	if (a <= b) {
		if (a <= c) {
			if (b <= c) output(c, b, a);
			else output(b, c, a);
		}else output(b, a, c);
	}
	else if (a <= c) output(c, a, b);
	else if (b <= c) output(a, c, b);
	else output(a, b, c);
	char a____;
	cin >> a____;

	return 0;
}

void output(int ab, int bc, int ca) {
	cout << ab << "\n" << bc << "\n" << ca << "\n";
}

C++: #include<iostream>

using namespace std;

int main(){
  int outHigh[3],inHigh[10];
  int where;
  outHigh[0]=0;
  outHigh[1]=0;
  outHigh[2]=0;
  
  for(int i = 0; i < 10; i++){
    cout << "height of mountain "<<i<<" (integer)  ";
    cin >> inHigh[i];
    cout <<endl;
    }
  
  for(int j = 0; j < 3; j++){
    for(int i = 0; i < 10; i++){
      if(outHigh[j] < inHigh[i]){
	outHigh[j] = inHigh[i];
	where = i;
      }	
    }
    inHigh[where] = 0;
  }
  
  for(int i = 0; i < 3; i++){
    cout << outHigh[i]<<endl;
  }
  
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
int a[10];
for(int i =0; i < 10; i++){
cin >> a[i];
}
sort( a, a + 10, greater<int>());
for(int j = 0; j < 3; j++){
cout << a[j] << endl;
}
return 0;
}

C++: #include <iostream>

using namespace std;

int main()
{
    long n,a=0,b=0,c=0;

    for(int i=1; i<=10;  i++){
        cin>>n;
        if(n>a){
            c=b;
            b=a;
            a=n;
        }
        else if(n>b){
            c=b;
            b=n;
        }
        else if(n>c){
            c=n;
        }
    }
    cout<<a<<endl<<b<<endl<<c;
    return 0;
}

C++: #include<stdio.h>
int main(){
  int data[10];
  int temp;
  int i,j;
  for(i=0;i<10;i++){
    scanf("%d",&data[i]);
  }
  for(i=0;i<3;i++){
    for(j=0;j<9-i;j++){
      if(data[j]>data[j+1]){
	temp=data[j];
	data[j]=data[j+1];
	data[j+1]=temp;
      }
    }
    printf("%d\n",data[j]);
  }
  return 0;
}

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

int main(){
	int height[10];
    for (int i = 0; i < 10; i++)
		cin >> height[i];
	sort(height, height + 10);
	cout << height[7] << '\n';
	cout << height[8] << '\n';
	cout << height[9] << '\n';
    return 0;
}

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

   return 0;
}