Go: package main

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

func main() {
	mountHeightList := make([]int64, 10)
	scanner := bufio.NewScanner(os.Stdin)
	for i := 0; i < 10; i++ {
		scanner.Scan()
		mountHeightList[i], _ = strconv.ParseInt(scanner.Text(), 10, 64)
	}

	sort.Slice(mountHeightList, func(i, j int) bool { return mountHeightList[i] > mountHeightList[j] })

	for i := 0; i < 3; i++ {
		fmt.Printf("%d\n", mountHeightList[i])
	}
}

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

int main() {
	int h[10];

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

	std::sort(h, h + 10);

	std::cout
		<< h[9] << std::endl
		<< h[8] << std::endl
		<< h[7] << std::endl;
}

C++: #include <stdio.h>

int main(void)
{
	int i,f=0,s=0,t=0,h[10];
	for(i=0;i<10;i++){
		scanf("%d",&h[i]);
	}
	for(i=0;i<10;i++){
		if(f<h[i]){
			f=h[i];
		}
	}
	for(i=0;i<10;i++){
		if(s<h[i]&&f<=h[i]){
			s=h[i];
		}
	}
	for(i=0;i<10;i++){
		if(t<h[i]&&s<=h[i]){
			t=h[i];
		}
	}
	printf("%d\n%d\n%d\n",f,s,t);
	return 0;
}

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

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

  sort(h, h+10, greater<int>());

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

  return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
int x,No1,No2,No3;
No1=0;
No2=0;
No3=0;
for(int i=0;i<10;i++){
cin>>x;
if(x>No1){
No3=No2;
No2=No1;
No1=x;
}else if(x>No2){
No3=No2;
No2=x;
}else if(x>No3){
No3=x;
}
}
cout<<No1<<endl<<No2<<endl<<No3<<endl;
return 0;
}

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

int main() {
	int mt[10];
	int best[3]={-1, -1, -1};
	for(int i=0; i<10; ++i) {
		cin >> mt[i];
	}

	for(int i=0; i<10; ++i) {
		if(mt[i]>best[2]) {
			if(mt[i]>best[1]) {
				best[2]=best[1];
				if(mt[i]>best[0]) {
					best[1]=best[0];
					best[0]=mt[i];
				} else {
					best[1]=mt[i];
				}
			} else {
				best[2]=mt[i];
			}
		}
	}
	
	cout << best[0] << endl
		 << best[1] << endl
		 << best[2] << endl;
}

C++: #include <iostream>
#define N 10

using namespace std;

void swap(int& a, int& b){
	int tmp = a;
	a = b;
	b = tmp;
}

void bubble_sort(int mountain[N]){
	for (int i=0; i<N; ++i){
		for (int j=0; j<(N-i); ++j){
			if (mountain[j] < mountain[j+1]){
				swap(mountain[j], mountain[j+1]);
			}
		}
	}
}

int main(void){
	int mountain[N];
	for (int i=0; i<N; ++i){
		int tmp;
		do{
			cin >> tmp;
			if ((tmp<0) || (10000 < tmp)){
				return -1;
			}
		}while ((tmp<0) || (10000 < tmp));
		mountain[i] = tmp;
	}
	bubble_sort(mountain);
	//cout << "output" << endl;
	for (int i=0; i<3; ++i){
		cout << mountain[i] << endl;
	}
	return 0;
}

C++: #include <iostream>
#define N 10

using namespace std;

void swap(int& a, int& b){
	int tmp = a;
	a = b;
	b = tmp;
}

void bubble_sort(int mountain[N]){
	for (int i=(N-1); i>0; --i){
		for (int j=i; j>0; --j){
			if (mountain[j-1] < mountain[j]){
				swap(mountain[j-1], mountain[j]);
			}
		}
	}
}

int main(void){
	int mountain[N];
	for (int i=0; i<N; ++i){
		int tmp;
		do{
			cin >> tmp;
		}while ((tmp<0) || (10000 < tmp));
		mountain[i] = tmp;
	}
	bubble_sort(mountain);
	cout << "output" << endl;
	for (int i=0; i<3; ++i){
		cout << mountain[i] << endl;
	}
	return 0;
}

C++: 
class q2
{
	public static void main(String[] av)
	{
		java.util.Scanner sc = new java.util.Scanner(System.in);
		java.util.ArrayList<Integer> vec = new java.util.ArrayList<Integer>();
		while( sc.hasNextInt() )
		{
			vec.add( sc.nextInt() );	
		}
		java.util.Collections.sort( vec );
		java.util.Collections.reverse( vec );
		for ( int i = 0; i < 3; ++i )
		{
			System.out.println( vec.get(i) );
		}
	}
}

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);
	for(int i=9; i>=7; i--){
		cout << h[i] << endl;
	}
	return 0;
}

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

C++: #include <bits/stdc++.h>
using namespace std;
int n[17];

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

C++: #include <stdio.h> 
using namespace std; 
int main(){

 int count[10001],
tmp,num=3;
 
for(int i=0;i<10001;i++){

count[i]=0;

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

 scanf("%d",&tmp);
 count[tmp]++; 
} 

for(int i=10000;i>=0&&num>0;i--){ 

if(count[i]>0){ 

for(int k=0;k<count[i]&&num>0;k++){
 printf("%d\n",i);
 num--; 
}
 } 
} 
}
return 0; }

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

using namespace std;

int main() {
	int h[10] = { 0 };

	for (int i = 0; i < 10; i++)
	{
		scanf_s("%d", &h[i]);
		//printf("%d\n", h[i]);
	}

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

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

int main(){
	
	int first=0;
	int second=0;
	int third=0;
	int n=10;
	int h=0;
	
	for(int i=0;i<n;i++){
		
		cin>>h;
	
		if (h>first){
	
			third=second;
			second=first;
			first=h;
	
			}
	
		else if (h>second){
			
			third=second;
			second=h;
	
	
			}
	
		else if (h>third){
	
			third=h;
	
			}
		
		}
	
		cout<<first<<" "<<second<<" "<<third<<"\n";
	
		return 0;
	
	}

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

int main(){
  int v[10];
  int temp;
  int i,j;

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

  for(i=0;i<9;i++)
    for(j=0;j<9;j++)
      if(v[j]>v[j+1]){
	temp = v[j];
	v[j] =v[j+1];
	v[j+1] = temp;
      }
  for(i=9;i>6;i--)
    cout<<v[i]<<endl;

  return 0;
}

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

int main()
{
	std::array<int,10> mh;
	for (int &el : mh){
		std::cin >> el;
	}
	std::sort(mh.begin(), mh.end());

	std::cout << *(mh.end() -1) << std::endl;
	std::cout << *(mh.end() - 2) << std::endl;
	std::cout << *(mh.end() - 3) << std::endl;

}

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

int main(){
	int a[10];
	stack<int> h;
	for(int i=0;i<10;++i){
		cin>>a[i];
	}
	sort(a,a+10);
	for(int i=0;i<10;++i){
		h.push(a[i]);
	}
	for(int i=0;i<3;++i){
		int ans=h.top();
		cout<<ans<<endl;
		h.pop();
	}
	return 0;
}

C++: #include<iostream> 
#include<algorithm>
using namespace std;
void bubblesort(int A[]){
	for(int i=0;i<10;i++){
		for(int j=10-1;j>i;j--){
			if(A[j]>A[j-1]){
			int t=	A[j-1];
			A[j-1]=A[j];
			A[j]=t;
			}
		}
	}	
}
int main(){
	int A[10];
	for(int i=0;i<10;i++){
		cin>>A[i];
	}
	for(int i=0;i<3;i++)
	{
		bubblesort(A);
		if(i>0)cout<<endl;
		cout<<A[i];
	 } 
}

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

int main(){
	int high[3] = {0}, height;
	while(cin >> height){
		if(high[0] < height){
			high[2] = high[1];
			high[1] = high[0];
			high[0] = height;
		}
		else if(high[1] < height){
			high[2] = high[1];
			high[1] = height;
		}
		else if(high[2] < height)
			high[2] = height;
	}
	for(int i = 0; i < 3; i++)
		cout << high[i] << endl;
    return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
	int m[10];
	for(int i=0;i<10;i++) cin >> m[i];
	while(1){
		bool j = true;
		for(int i=0;i<9;i++){
			if(m[i]<m[i+1]){
				int t = m[i];
				m[i] = m[i+1];
				m[i+1] = t;
				j = false;
			}
		}
		if(j) break;
	}
	for(int i=0;i<3;i++) cout << m[i] << endl;
}

C++: #include <iostream>
#include <algorithm>
#include <cstdio>
#define N 10
using namespace std;

int main() {
    int data[N];
    for (int i=0; i<N; i++) {
        cin >> data[i];
    }
    sort(data,data+N);
    reverse(data,data+N);
    for (int i=0; i<3; i++) {
        printf("%d\n",data[i]);
    }
    return 0;
}