Go: package main

import (
	"fmt"
	"sort"
)

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

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

	sort.Ints(mt)
	fmt.Printf("%d\n%d\n%d\n", mt[9], mt[8], mt[7])

}

C++: #include<iostream>

int main(){
	int a[10],i,n,j;

	for(i=0;i<10;i++){
		std::cin >> a[i];
		}

	for(i=0;i<9;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<stdlib.h>
#include<stdio.h>

int compare(const void* s,const void *t ){
  return (*((int*)t) - *((int*)s));
}

int main(){
  int height[10];
  int i=0;
  while(~scanf("%d",&height[i++]));
  qsort(height, 10, sizeof(height[0]), compare );
  for( i = 0; i < 3 ; i++ )
    printf("%d\n",height[i]);
  return 0;
}

C++: #include <iostream>
using namespace std;
int main(void){
  int mountain[10];
  for(int i = 0; i < 10; i++) {
    cin >> mountain[i];
  }
  
  for(int i = 0; i < 9; i++) {
    for(int j = i; j < 10; j++) {
      if(mountain[i] < mountain[j]) {
        int temp = mountain[i];
        mountain[i] = mountain[j];
        mountain[j] = temp;
      }
    }
  }
    
  for(int i = 0; i < 3; i++) {
    cout << mountain[i] << endl;
  }
}

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

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

int main(){

	int a[11],max1,max2,max3;

	for (int i=1; i<11; i++){
		while (true){ 
		cout << "山の高さ" << i << "（整数）" ;			
		cin >> a[i];
		if ((cin.good() == 1) && (a[i] >= 0) && (a[i] <= 10000)) {
			break;
		}
		}	
	}

	max1 = a[1];

	for (int i=2; i<11; i++){
		if (max1 < a[i]){
			swap(max1,a[i]);
		}
	}
	max2 = a[2];

	for (int i=3; i<11; i++){
		if (max2 < a[i]){
			swap(max2,a[i]);
		}
	}
	max3 = a[3];

	for (int i=4; i<11; i++){
		if (max3 < a[i]){
			swap(max3,a[i]);
		}
	}


		cout << max1 << endl;
		cout << max2 << endl;
		cout << max3 << endl;
		

return 0;
	}

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

int main() {
	int first, second, third, input[10];
	first=0;
	second=0;
	third=0;
	cin >> input[0]
	cin >> input[1]
	cin >> input[2]
	cin >> input[3]
	cin >> input[4]
	cin >> input[5]
	cin >> input[6]
	cin >> input[7]
	cin >> input[8]
	cin >> input[9]
	int i;
	for(i=0;i<=10;i++){
		if(input[i] > third){
			if(input[i] > second){
				if(input[i] > first){
					first=input[i];
				}else{
					second=input[i];
				}
			}else{
				third=input[i];
			}
		}
	}
	cout << first << endl;
	cout << second << endl;
	cout << third << endl;
	return 0;
}

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

using namespace std;

int compare(const void *a, const void *b)
{
    return *(int*)a - *(int*)b;
}

int main(){
    int arr[10];

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

    sort(arr, arr + 10);
    for (int i = 1; i <= 3; i++)
    {
        cout << arr[10 - i] << endl;
    }


    return 0;
}

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

using namespace std;

int main(){
	int a[10] = {0};
	for(int i = 0; i < 10; i++){
		cin >> a[i];
	}
	sort(a, a + 10);
	for(int i = 0; i < 3; i++){
		cout << a[i] << endl;
	}
	return 0;
}

C++: #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <stddef.h>
#include <ctype.h>
#include <float.h>
#include <limits.h>

const double  pi = 2 * acos (0.0);

int main()

{
    int a[10000],i,j,k,l,hand=0,temp=0,sum=0;

    for(i=0;i<10;i++)
    {
        scanf("%d",&a[i]);
    }
    for(i=0;i<10;i++)
    {
        if(a[i]>hand)
        {
            hand = a[i];
        }
    }
    printf("%d\n",hand);

    for(i=0;i<10;i++)
    {
        if(a[i]>temp)
        {
            if(a[i]==hand)
            {
                continue;
            }
            else
            {
                temp = a[i];
            }
        }
    }
    printf("%d\n",temp);

    for(i=0;i<10;i++)
    {
        if(a[i]>sum)
        {
            if(a[i]==hand || a[i]==temp)
            {
                continue;
            }
            else
            {
                sum = a[i];
            }
        }
    }
    printf("%d\n",sum);
}

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

int main() {
    int input[10];
    for(int i=0; i<10; ++i) {
        cin >> input[i];
    }
    sort(begin(input), end(input));
    cout << input[9] << "\n" << input[8] << "\n" << input[7] << endl;
}

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

int main() {
	
	typedef std::multiset<int> MySet;
	MySet heightSet;
	
	for(int i = 0; i < 10; ++i)
	{
		int val;
		cin >> val;
		heightSet.insert(val);
	}
	
	MySet::reverse_iterator rit = heightSet.rbegin();
	for(int i = 0; i < 3; ++i)
	{
		cout << *rit << endl;
		++rit;
	}
	
	return 0;
}

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

int number[10];
int count = 0;
int flag = 0;
int temp = 0;

int main(){

        for(count=0;count<10;count++){
                cin >> number[count];
                }
        count = 0;

        while(flag<10){
                for(count=0;count<9;count++){
                        if(number[count]<number[count+1]){
                                temp=number[count];
                                number[count]=number[count+1];
                                number[count+1]=temp;
                        }
                }
                flag++;
}
        for(count=0;count<3;count++){
                cout<<number[count]<<endl;
        }
}

C++: #include <stdio.h>

int fir(const int *);
int sec(const int *);
int thi(const int *);

int main(void)
{
	int i,h[10];
	for(i=0;i<10;i++){
		scanf("%d",&h[i]);
	}
	printf("%d",fir(h));
	printf("%d",sec(h));
	printf("%d",thi(h));
	return 0;
}

int fir(const int *h){
	int i,f=0;
	for(i=0;i<10;i++){
		f<h[i] ? f=h[i] : /*処理無し*/;
	}
	return f;
}

int sec(const int *h){
	int i,f,s;
	for(i=0;i<10;i++){
		f<h[i] ? f=h[i] : /*処理無し*/;
	}
	for(i=0;i<10;i++){
		f>=h[i] && s<h[i] ? s=h[i] : /*処理無し*/;
	}
	return s;
}

int thi(const int *h){
	int i,f,s,t;
	for(i=0;i<10;i++){
		f<h[i] ? f=h[i] : /*処理無し*/;
	}
	for(i=0;i<10;i++){
		f>=h[i] && s<h[i] ? s=h[i] : /*処理無し*/;
	}
	for(i=0;i<10;i++){
		s>=h[i] && t<h[i] ? t=h[i] : /*処理無し*/;
	}
	return t;
}

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

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

int main(){
    array<int,10> h{};
    int in{};
    for(int i=0;i<10;i++){
        cin>>in;
        h[i]=in;
    }
    sort(h.begin(),h.end());
    cout<<h[9]<<endl;cout<<h[8]<<endl;cout<<h[7]<<endl;
    return 0;
}

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

int main(){
  multiset<int, greater<int> > mts{};
  for(int i = 0; i < 10; i++){
    int tmp = 0;
    scanf("%d", &tmp);
    mts.insert(tmp);
  }
  int count = 0;
  for(int const mt : mts){
    printf("%d\n", mt);
    if(++count >= 3) break;
  }
  return 0;
}

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

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);

  vector<ll> A(10, 0);
  for (int i = 0; i < 10; i++) {
    cin >> A[i];
  }
  sort(A.begin(), A.end());
  reverse(A.begin(), A.end());

  for (int i = 0; i < 3; i++) {
    cout << A[i] << '\n';
  }
  return 0;
}

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

int main() {
	int h[10];
	int max[3];
	int tmp, maxj;

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

	for (int i = 0; i < 3; ++i) {
		tmp = 0;
		for (int j = 0; j < 10; ++j) {
			if (h[j] > tmp) {
				tmp = h[j];
				maxj = j;
			}
		}
		max[i] = tmp; h[maxj] = 0;
	}

	for (int i = 0; i < 3; ++i) {
		cout << max[i] << endl;
	}
	return 0;
}