Go: package main

import (
	"fmt"
	"sort"
)

func main() {
	mountains := make([]int, 10, 10)

	for i := 0; i < 10; i++ {
		fmt.Scan(&mountains[i])
	}

	sort.Sort(sort.Reverse(sort.IntSlice(mountains)))

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

C++: #include <iostream>                              
#include <algorithm>                             
                                                 
using namespace std;                             
                                                 
int main(int argc, char **argv) {                
    int mountain[10];                            
                                                 
    for (int i = 0; i < 10; i++) {               
        cin >> mountain[i];                      
    }                                            
                                                 
    sort(mountain, mountain + 10, greater<int>());
                                                 
    for (int j = 0; j < 3; j++) {                
        cout << mountain[j] << endl;             
    }                                            
                                                 
    return 0;                                    
}

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


int main() {
int a[10],i;	
for(int i=0; i<10; i++) cin>>a[i];
sort(a, a+10);
for(i=9; i>6; i--)
cout<<a[i]<<endl;
// your code goes here
	return 0;
}

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

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

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

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

int main()
{
    
    int i = 10,m[10];
    
    while(i>0){
        cin >> m[i];
        i--;
    }
    
    int 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;
    
    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;
    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;
    
    return 0;
}

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

int main()
{
    int h;
    int max1 = 0, max2 = 0, max3 = 0;
    while (cin >> h)
    {
	if (max1 <= h)
	{
	    max3 = max2; max2 = max1; max1 = h;
	}
	else if (max2 <= h)
	{
	    max3 = max2; max2 = h;
	}
	else if (max3 <= h)
	{
	    max3 = h;
	}
    }
    cout << max1 << endl;
    cout << max2 << endl;
    cout << max3 << endl;
    return 0;
}

C++: #define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ALL(v) v.begin(), v.end()
typedef long long ll;

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

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

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

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

using namespace std;

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

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

  for (int i = 0; i < 3; i++) {
    cout << height_of_mountains[10 - 1 - i] << endl;
  }
  return 0;
}

C++: #include <stdio.h> #include <functional> #include <algorithm> int main(){ int mt[10], i; std::sort(mt, mt + 10, std::greater<int>); for (i = 0; i < 3; i++) printf("%d", mt[i]);return 0; }

C++: #include <stdio.h>
int main(void){
	int d, m1 ,m2 ,m3, i;
	for(i=0;i<10;i++){
		scanf("%d",&d);
		if(d>m1){
		m3=m2 ;
		m2=m1 ;
		m1=d ;
	}else if (d>m2){
		m3=m2 ;
		m2=d ;
	}else if (m3<d){
		m3=d ;
	}
	printf("%d\n%d\n%d\n", m1. m2 ,m3 ) ;
	return 0

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

int main()
{
	int x;
	priority_queue<int> p;
	for(int i=0;i<10;i++){
		scanf("%d",&x);
		p.push(x);
	}
	for(int i=0;i<3;i++){
        printf("%d",p.top());
        if(i<2)
        	printf(" ");
		p.pop();
	}
	return 0;
}

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

int main()
{
	int input;
	int top[3]={0,0,0};
	for(int i=0;i<10;i++){
		cin>>input;
		for(int j=0;j<3;j++){
			if (input>top[j]){
				top[j]=input;
				break;
			}
		}
	}
	for(int j=0;j<3;j++){
		cout << top[j];
	}
}

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

int main(){
	int first = 0;
	int second = 0;
	int third = 0;
	int num;
	for(int i = 0;i<=9;i++)
	{

		cin >> num;
		
		if(num >= first)
		{
			third = second;
			second = first;
			first = num;
		}else if(num >= second)
		{
			third = second;
			second = num;
		}else if(num >=third)
		{
			third = num;
		}
		
	}
	
	cout << first << endl << second << endl <<  third;
	
    return 0;
}

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

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

C++: #include <stdio.h>

int main(){
	int height[10], rank[3] = {0};
	int i;
	
	for(i = 0; i < 10; i++){
    	scanf("%d", height[i]);

        if (rank[0] < height[i]){
        	rank[2] = rank[1];
        	rank[1] = rank[0];
        	rank[0] = height[i];
        }else if (rank[1] < height[i]){
        	rank[2] = rank[1];
        	rank[1] = height[i];
        }else if (rank[2] < height[i]){
        	rank[2] = height[i];
        }
    }

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

	return 0;
}

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

const int SIZE = 10;

int Sort(int A[], int N, int name) {
	int j, i, v;

	for (i = 1; i < N; i++) {
		v = A[i];
		j = i - 1;
		while (j >= 0 && A[j] > v) {
			A[j + 1] = A[j];
			j--;
		}
		A[j + 1] = v;
	}
	return A[name];

}

int main(){
	int Height[10];
	int sort[3];

	for (int i = 0; i < SIZE; i++) {
		cin >> Height[i];
		if (Height[i] > 10000) {
			Height[i] = 0;
			i--;
		}
	}

	sort[0] = Sort(Height, SIZE, 9);
	sort[1] = Sort(Height, SIZE, 8);
	sort[2] = Sort(Height, SIZE, 7);
	
	cout << endl;
	cout <<  sort[0] << endl;
	cout <<  sort[1] << endl;
	cout <<  sort[2] << endl;

	return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(void)
{
    int a;
    vector<int> v;
    for (int i = 0; i < 10; i++)
    {

        cin >> a;
        v.push_back(a);
    }
    sort(v.begin(), v.end());
    cout << v[0] << "\n";
    cout << v[1] << "\n";
    cout << v[2] << "\n";
}

C++: #include<bits/stdc++.h>
using namespace std;
int ma1,ma2,ma3,a[9],i,j,c;
int main(){
	for(i=0;i<10;i++){
		cin>>a[i];
	}
	while(c<=9){
	     for(j=9;j>=1;j--){
		     if(a[j]<a[j-1]){
			    swap(a[j],a[j-1]);
		      }
		 }
		  c++;
		  j=9;
	 }
	 cout<<a[9]<<endl;
	 cout<<a[8]<<endl;
	 cout<<a[7]<<endl;
 }