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 array[10];
	for(int i = 0; i < 10; i++) {
		cin >> array[i];
	}
	sort(array, array + 10);
	cout << array[9] << endl;
	cout << array[8] << endl;
	cout << array[7] << endl;

	return 0;
}

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

int main(){
	int date[10], work;
	for(int i = 0; i < 10; i++){
		cin >> date[i];
	}

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

C++: #include<iostream.h>
#include<vector.h>
#include<algorithm.h>
int main(){int n,i;vector<int> h;for(i=0;i<10;++i)cin>>n,h.push_back(n);sort(h.begin(),h.end());for(i=9;i>6;i--)cout<<h[i]<<endl;}

C++: #include<stdio.h>
int main(void) {
	int a, b, c[12],top=0,second=0,thread=0;
	for (int i = 1; i <= 10; i++)
	{
		scanf("%d", &c[i]);
		if (c[i]>=top)
		{
			if (c[i] == top)continue;
			second = top;
			top = c[i];
		}
		else
		{
			if (c[i]>=second)
			{
				if (c[i] == second)continue;
				thread = second;
				second = c[i];
			}
			else
			{
				if (c[i]>thread)
				{
					thread = c[i];
				}
			}
		}
	}
	printf("%d\n%d\n%d\n", top, second, thread);
	return 0;
}

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

int main(){
	bool flag;
	int result[3],buf,temp[10];
	for(int i = 0; i < 10; i++){
		cin >> temp[i];
	}
	for(int l = 0; l < 3; l++){
		while(1){
			for(int j = l; j < 9; j++){
				if(temp[j] < temp[j+1]){
					buf = temp[j+1];
					temp[j+1] = temp[j];
					temp[j] = buf;
				}
			}
			flag = false;
			for(int k = l; k < 9; k++){
				if(temp[l] < temp[k]) flag = true;
			}
			if(flag != true){
				result[l] = temp[l];
				break;
			}
		}
	}
	cout << result[0] << endl;
	cout << result[1] << endl;
	cout << result[2] << endl;
	return 0;
}

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;
}