Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func read() string {
	sc.Scan()
	return sc.Text()
}

func main() {
	sc.Split(bufio.ScanLines)

	s := make([]int, 10)
	for i := 0; i < 10; i++ {
		s[i], _ = strconv.Atoi(read())
	}
	sort.Sort(sort.Reverse(sort.IntSlice(s)))
	fmt.Println(s[0])
	fmt.Println(s[1])
	fmt.Println(s[2])
}

C++: #include <iostream>
#include <stdio.h>
#include <stdlib.h>
#define N 10
int main(int argc, const char * argv[])
{
    int x=0;
    int max1=-1;
    int max2=-2;
    int max3=-3;
    
    for(int j=0; j<N; j++){
        scanf("%d\n",&x);
        if(max1<=x){
            max3=max2;
            max2=max1;
            max1=x;
        }else if(max2<x){
            max3=max2;
            max2=x;
        }else if(max3<x){
            max3=x;
        }
        printf("%d\n",max1);
        printf("%d\n",max2);
        printf("%d\n",max3);

    }
}

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

int main()
{
	int m[11], i, j, work;
	for(i=0; i<10; i++)
	{
		cin >> m[i];
	}
	for(i=0; i<10; i++)
	{
	 	for(j=0; j<10; j++)
		{
	    	if(m[i] > m[j])
			{
	   			work = m[i]; m[i] = m[j]; m[j] = work;
	   		}
	  	}
	}
	for(i=0; i<3; i++)
	{
	 	cout << m[i] << endl;
	}
	return 0; 
}

C++: #include<iostream>
#include<vector>
int main() {
	std::vector<int> h(10);
	std::vector<int> mh(3);
	for (int i = 0; i < 10; ++i)std::cin >> h[i];
	for (int i = 0; i < 3; ++i) mh[i] = 0;
	for (int i = 1; i < 10; ++i) {
		if (mh[0] < h[i])mh[0] = h[i], h[i]=0;
	}
	for (int i = 1; i < 10; ++i) {
		if (mh[1] < h[i])mh[1] = h[i], h[i] = 0;
	}
	for (int i = 1; i < 10; ++i) {
		if (mh[2] < h[i])mh[2] = h[i], h[i] = 0;
	}
	for (int i = 0; i < 3; ++i)std::cout << mh[i] << std::endl;
	return 0;
}

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

C++: #include <stdio.h>
#include <math.h>
#include <iostream>
using namespace std;

int main(void){
	int x[10],top[3];
	int i;

	for(i=0;i<3;i++){
		top[i] = 0;
	}
	for(i=0;i<10;i++){
		std::cin >> x[i];
		if(top[0] < x[i]){
			top[2] = top[1];
			top[1] = top[0];
			top[0] = x[i];
		}
	}

	std::cout << top[0] << "\n" << top[1] << "\n" <<top[2] << "\n";
	return 0;
}

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

int main(){
	int mount[10];
	int i;
	for (i = 0; i < 10; i++) {
		cin >> mount[i];
	}
	int top = 0;
	int second = 0;
	int third = 0;

	for (i = 0; i < 10; i++) {
		if (third <= mount[i]){
			third = mount[i];
			if (second < mount[i]){
				third = second;
				if (top <= mount[i]){
					second = top;
					top = mount[i];
				}
				else
				{
					second = mount[i];
				}
			}
		}
	}

	cout << top << endl << second << endl << third << endl;
	cin >> i;
	return 0;
}

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

int main(){
    vector<int> a;
    int b;
    while(cin >> b)
        a.push_back(b);
    sort(a.rbegin(),a.rend());
    for(int i = 0; i<3; i++)
        cout << a[i] << endl;
    return 0;
}

C++: #include <cstdio>

using namespace std;

inline void sort(int* a, int n) {
    for (int i = 0; i < n; i ++) {
        for (int j = i; j < n; j ++) {
            if (a[i] < a[j]) {
                int tmp = a[i];
                a[i] = a[j];
                a[j] = tmp;
            }  
        }
    }
}

int main() {
    int a[10];
    for (int i = 0; i < 10; i ++) {
        scanf("%d", &a[i]);
    }
    sort(a, 10);

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

}

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

using namespace std;

int main(void)
{
	array<int, 10> input;

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

	sort(begin(input), end(input), less<int>());

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


	return 0;
}

C++: #include<stdio.h>
#include<iostream>
using namespace std;
int main(){
	int a = 0,b=0,c=0,d=0;
	for (int i = 0; i < 10;i++){
		cin >> a;
		if (a>b){
			a = b;
			b = c;
			c = d;

		}

	}
	cout << b << endl << c << endl << d;
	return 0;
}

C++: #include<stdio.h>

int main()
{
	int mt[10],i,top[3],j,a;
	for(i=0;i<10;i++){
		scanf("%d",&mt[i]);
	}
	
	for(i=0;i<9;i++){
		for(j=0;j<9-i;j++){
			if(mt[j]>mt[j+1]){
				a=mt[j];
				mt[j]=mt[j+1];
				mt[j+1]=a;
			}
		}
	}
	
	printf("%d\n%d\n%d\n",mt[9],mt[8],mt[7]);
	return 0;
}

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

int main(){
	cin.tie(0),ios::sync_with_stdio(false);
	vector<int>v(10); for(auto&&i:v)cin>>i;
	sort(v.rbegin(),v.rend());
	for(auto i=v.begin();i!=v.begin()+3;++i)cout<<*i<<"\n"s;
}

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

int main()
{
    const int num_of_height = 10;
    const int num_of_top = 3;
    const int min = 0;
    const int max = 10000;
    
    int h;
    std::vector<int> height;
    height.reserve(num_of_height);
    
    //std::cout << num_of_height << "個の高さの入力" << std::endl;
    for(int i = 0; i < num_of_height; ++i){
        while(1){
            std::cin >> h;
            if(min <= h && h <= max)
                break;
            else
                std::cout << min << "<=h<=" << max << "に設定" << std::endl;
        }
        height.push_back(h);
    }
    
    sort(height.begin(), height.end(), std::greater<int>());
    
    //std::cout << "高い順から" <<  num_of_top << "個出力" << std::endl;
    for(int i = 0; i < num_of_top; ++i)
        std::cout << height.at(i) << std::endl;
        
    return 0;
}

C++: #include<stdio.h>

int main(void)
{
	int i,j,wk;	
	int data[10];
	
	for(i=0;i<10;i++){
		scanf("%d",&data[i]);
	}
	for(i=0;i<9;i++){
		for(j=i+1;j<10;j++){
			if(data[i]<data[j]){
				wk=data[i];
				data[i]=data[j];
				data[j]=wk;
			}
		}
	}
	printf("%d\n",data[0]);
	printf("%d\n",data[1]);
	printf("%d\n",data[2]);

	return 0;
}

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

void printA(int A[], int N){
	printf("%d",A[0]);
	for(int i=1; i<N; ++i){
		printf(" %d",A[i]);
	}
	printf("\n");
}

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

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

using namespace std;

int main(void) {
	int array[10];
	for(int i = 0; i < 10; i++)
		scanf("%d", &array[i]);
	sort(array, array + 10, greater<int>());
	for(int i = 0; i < 3; i++)
		printf("%d\n", array[i]);
	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+9, greater<int>());

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

  return 0;
}

C++: #include "bits/stdc++.h"
using namespace std;
int main(){
    vector<int> v;
    int a;
    for(int i=0; i<10; i++){
        cin >> a;
        v.push_back(a);
    }
    sort(v.begin(), v.end());
    cout << v[9] << endl;
    cout << v[8] << endl;
    cout << v[7] << endl;
    
    return 0;
}

C++: #include <iostream>
int main()
{
using namespace std;
int box[10];
for (int i=0;i<10;i++)
        cin >>box[i];
for (int i=1;i<10;i++)
{
        int key = box[i];
        int j = i-1;
        while (j>=0 && box[j] > key)
        {
                box[j+1]=box[j];
                j--;
        }
        box[j+1] = key;
}
cout << box[9] <<endl;
cout << box[8] <<endl;
cout << box[7] <<endl;
}