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

C++: #include<iostream>
using namespace std;
int main(){
	int a[10],k=0,tmp,i;
	for(i=0;i<10;i++)
		cin>>a[i];
	while(1){//無限ループ
		for(i=0;i<10;i++){
			if(a[i]<a[i+1]){//もし昇順でない場合
				tmp=a[i];//隣接しあう値を昇順に入れ替える
				a[i]=a[i+1];
				a[i+1]=tmp;
				k++;//カウント
			}
		}
		if(k==0) break;//入れ替える必要がなくなったら終了
		k=0;//カウントの初期化
	}
	
		cout<<a[0]<<"\n"<<a[1]<<"\n"<<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;
	cin >> s;
	cin >> d;
	cin >> f;
	cin >> g;
	cin >> h;
	cin >> j;
	cin >> k;
	cin >> l;
	cin >> 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<stdio.h>
int main(void){
	int d, m1 = 0, m2 = 0, m3 = 0, i;{
	scanf("%d", &d);
		for(i=1;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(d > m3){
					m3 = d;
					}
		}
	printf("%d\n""%d\n""%d\n", m1, m2, m3);
	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<bits/stdc++.h>
int main(){int a[10],i;for(i=0;i<10;i++)scanf("%d",&a[i]);std::sort(a,a+10);printf("%d\n%d\n%d\n",a[9],a[8],a[7]);}

C++: #include<iostream>
#include<stdlib.h>
using namespace std;
int Comp(const void *a,const void *b)
{
	return *(int*)a-*(int*)b;
}
int main()
{
	int i,a[10];
	for(i=0;i<10;i++)
		cin>>a[i];
	qsort(a,10,sizeof(int),Comp);
	for(i=9;i>6;i--)
		cout<<a[i]<<endl;
	return 0;
}

C++: #include<stdio.h>
int main(void){
	int i;
	int a[10];
	int x=0, y=0, z=0;
	
	for(i=0;i<10;i++){
		do{
			printf("山の高さ%d(整数)",i+1);
			scanf("%d",&a[i]);
		}while(a[i]<0||10000<a[i])
		
		if(a[i]>x){
			z=y;
			y=x;
			x=a[i];
		}
		else if(a[i]>y){
			z=y;
			y=a[i];
		}
		else if(a[i]>z){
			z=a[i];
		}
	}
	
	printf("%d\n%d\n%d\n",x,y,z);
	
	return 0;
}

C++: #include <iostream>

int main(){
	int m,mf=0,ms=0,mt=0;
	for(int a=0;a<10;a++){
		std::cin>>m;
		if(m>mf){
			mf=m;
			m=0;
	    }
		if(m>ms){
			ms=m;	
			m=0;
		}
			
		if(m>mt){
			mt=m;
			m=0;
		}
			
		
	}
	std::cout<<mf<<std::endl<<ms<<std::endl<<mt;
	return 0;
}

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

int main() {
  int mountain[10];
  cin << mountain[10];
  sort(mountain[10]);
  cout << mountain[1] << endl;
  cout << mountain[2] << endl;
  cout << mountain[3] << endl;
}

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

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

C++: #include<iostream>
using namespace std;
int main()
{
	int i,j,k;
	int j_1,k_1;
	int max=0;
	int height[10];
	int temp_1;
	int height_2[10];
	
	for(int a=0;a<10;a++)
		cin>>height[a];
		
	for(int a=0;a<10;a++)
		height_2[a]=height[a];
	for(int a=0;a<10;a++)
	{
		if(height[a]>=max)
			{
				max=height[a];
		        k=max;
				k_1=a;
			
		}
	
	}
	max=0;
	for(int a=0;a<10;a++)
	{
		if(a==k_1)
		{
			temp_1=height[a];
			height[a]=0;
		}
		if(height[a]>=max)
			{
				max=height[a];
		        j=max;
				j_1=a;
				
		}
		height[a]=temp_1;
		
	}
	max=0;
	for(int a=0;a<10;a++)
	{
		if(a==j_1)
		{
			height_2[a]=0;
		}
		if(a==k_1)
			{
				height_2[a]=0;
		    }
		if(height_2[a]>=max)
			{
				max=height_2[a];
		 	}
	}
	cout<<k<<endl<<j<<endl<<max<<endl;
	
	return 0;
}

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

int main()
{
    int A[10],h1,h2,h3,i,pos1,pos2;
    for(i=0;i<10;i++)
    cin>>A[i];
    h1=A[0];
    pos1=0;
    for(i=1;i<10;i++)
    {
        if(A[i]>h1)
        {
            h1=A[i];
            pos1=i;
        }
    }
    A[pos1]=-1;
    h2=A[1];
    pos2=1;
    for(i=2;i<10;i++)
    {
        if(A[i]>h2)
        {
            h2=A[i];
            pos2=i;
        }
    }
    A[pos2]=-1;
    h3=A[2];
    for(i=3;i<10;i++)
    {
        if(A[i]>h3)
            h3=A[i];
    }
    cout<<h1<<"\n"<<h2<<"\n"<<h3<<"\n";
}

C++: #include<stdio.h>

int main()
{
	int high[10];
	int i, j, temp;
	
	for(i = 0; i < 10; i++){
		scanf("%d",&high[i]);
	}
	
	for (i = 0; i < 9; i++){
		for (j = 9; j > i; j--){
			if (high[j - 1] < high[j]){
				temp = high[j];
				high[j] = high[j - 1];
				high[j - 1]= temp;
			}
		}
	
	}
	printf("\n%d\n%d\n%d",high[0], high[1], high[2]);
	
	return 0;
}

C++: #include <iostream>

using namespace std;

int main()
{
	int height[10];
	for (int i=0; i<10; i++) { cin >> height[i]; }
	
	int top[3] ={0};
	for (int i=0; i<10; i++) {
		for (int j=0; j<3; j++) {
			if (height[i] > top[j]) {
				for (int k=2; k>j; k--) { top[k] = top[k-1]; }
				top[j] = height[i];
				break;
			}
		}
	}
	
	for (int j=0; j<3; j++) { cout << top[j] << endl; }
	
	return 0;
}

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

int main() {
  int h[10];
  int a, b, c;
  for(int i=0; i<10; i++) {
    cin >> h[i];
  }
  a = b = c = -1;
  for(int i=0; i<10; i++) {
    if (h[i] > c) {
      if (h[i] > b) {
        if (h[i] > a) {
          c = b;
          b = a;
          a = h[i];
        }
        else {
          c = b;
          b = h[i];
        }
      } else {
        c = h[i];
      }
    }
  }
  cout << a << endl;
  cout << b << endl;
  cout << c << endl;
}

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

using namespace std;

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

C++: #include <stdio.h>

#define MAX_NUM	(10)

static void 
sort(int h[])
{
	for (int i = 0; i < MAX_NUM; i++) {
		for (int j = MAX_NUM - 1; j > i; j--) {
			if (h[j] > h[j-1]) {
				int tmp = h[j];
				h[j] = h[j-1];
				h[j-1] = tmp;
			}
		}
	}
}

int
main(void)
{
	char line[80];
	int h[MAX_NUM] = { 0 };

 	for (int i = 0 ; i < 10; i++) {
		if (gets(line)) {
			if (sscanf(line, "%d", &(h[i])) != 1) {
				break;
			}
		}
 	}

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

	return 0;
}