Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func nextInt() int {
	scanner.Scan()
	i, e := strconv.Atoi(scanner.Text())
	if e != nil {
		panic(e)
	}
	return i
}
func main() {
	heighs := make([]int, 10)
	for i := range heighs {
		heighs[i] = nextInt()
	}
	sort.Sort(sort.Reverse(sort.IntSlice(heighs)))
	for i := 0; i < 3; i++ {
		fmt.Println(heighs[i])
	}
}

C++: #include<stdio.h>

int main(){
	
	int a[3];
	int o, j;

	a[0] = a[1] = a[2] = 0;
	
	for(j = 0; j < 9; j++){
		
		scanf("%d\n",&o);
		
		if(o == 0){
			
			continue;
			
		}
		
		if(a[0] < o){
			
			a[2] = a[1];
			a[1] = a[0];
			a[0] = o;
			
		}else if(a[1] < o){
			
			a[2] = a[1];
			a[1] = o;
			
		}else if(a[2] < o){
			
			a[2] = o;
			
		}
		
	}
	
	printf("%d\n", a[0]);
	printf("%d\n", a[1]);
	printf("%d\n", a[2]);
	
    return 0;
}

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

int main(){
	int mountains[9] = {};

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

	for(int i = 0; i < 10; i++){
		int maxIndex = 0;
		for(int j = 0; j < 10; j++){
			if(mountains[maxIndex] < mountains[j]){
				maxIndex = j;
			}
		}
		cout << mountains[maxIndex] << endl;
		mountains[maxIndex] = -1;
	}

	return 0;

}

C++: #include<stdio.h>
        
int main(void){
        
    /* 宣言と初期化 */
    int hai[10];
    int id[2]
    int i;
    int temp2nd;
    int temp3rd;
    int tempmax;
        
for(i=0;i<10;i++)
{
scanf("%d",&hai[i]);
}
    /* 代入 */
    temp2nd=hai[0];
    tempmax=hai[0];
    temp3rd=hai[0];
        
    /* 計算 */
    for(i=0;i<10;i++){
        /* 最大値求める */
        if(hai[i]>tempmax)
       { tempmax=hai[i];id[0]=i;}
    }
        
    for(i=0;i<10;i++){
        /*2番目求める */
        if(hai[i]<tempmax&&hai[i]>temp2nd&&i=!id[0])
        {temp2nd=hai[i];id[1]=i;}
    }
        
    for(i=0;i<10;i++){
        /* 3番目求める */
        if(hai[i]>temp3rd&&hai[i]<temp2nd && i =! id[1] && i =! id[0])
       {temp3rd=hai[i];}
    }
        
    /* 表示 */
    printf("最も高い山の高さ　%d\n",tempmax);
    printf("２番目に高い山の高さ　%d\n",temp2nd);
    printf("３番目に高い山の高さ　%d\n",temp3rd);
        
    return 0;
}

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

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

C++: #include <iostream>
 
 
void Sort(int* a){
int tmp;
for(int i=0;i<10;i++){
for(int j=0;j<9;j++){
if(a[j]<a[j+1]){
tmp = a[j+1];
a[j+1]=a[j];
a[j] = tmp;
}
}
}
}
 
 
 
int main(){
 
int a[10];
 
for(int i=0;i<10;i++){
std::cin >> a[i];
}
Sort(a);
 
std::cout << a[0] << std::endl;
std::cout << a[1] << std::endl;
std::cout << a[2] << std::endl;
 
 
}

C++: #include<iostream>
#include<stdio.h>
#include<algorithm>
using namespace std;
int main()
{
    int s[11],i;
    for(i=0;i<10;i++){
        scanf("%d",&s[i]);
    }
    sort(s,s+10);
    for(i=9;i>6;i--){
        printf("%d\n",s[i]);
    }
 return 0;
}

C++: #include<iostream>
using namespace std;
int main()
{
    int a[10],b[3],c,d,i,j,s=0;
    for(i=0;i<10;i++)
    {
        cin >> a[i];
    }
    for(d=0;d<3;d++)
    {
    for(j=0;j<10;j++)
    {
        if(a[j]>s)
        {
            s=a[j];
            c=j;
        }
    }
    cout<<s<<endl;
    a[c]=0;
    s=0;
    }
    return 0;
}

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

int main(){
    vecctor<int> v;
    int num;
    for(int i = 0;i<10;i++){
        cin>>num;
        v.push_back(num);
    }

    sort(v.end(),v.begin(),greater<int>());
    


    for(int i = 0;i<3;i++)
        cout<<v.at(i);
    return 0;
}

C++: #include<bits/stdc++.h>
using namespace std ;
int main()
{
	int array[10] ;
	for(int i=0;i<10;i++)
	{
		cin>>array[i] ;
	}
	sort(array,array+10) ;
	for(int i=9;i>=7;i--)
	{
		cout<<array[i]<<endl ;
	}

}

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

int main() {
	int h[10];
	int rank[3];
	for(int i = 0; i < 3; i++){
		rank[i] = 0;
	}
	for(int i = 0; i < 10; i++){
		cin >> h[i];
	}
	for(int i = 0; i < 10; i++){
		if(h[i] >= rank[0]){
			rank[2] = rank[1];
			rank[1] = rank[0];
			rank[0] = h[i];
		} else if(h[i] >= rank[1]) {
			rank[2] = rank[1];
			rank[1] = h[i];
		} else if(h[i] >= rank[2]){
			rank[2] = h[i];
		}
	}
	for(int i = 0; i < 3; i++){
		cout << rank[i] << endl;
	}
	return 0;
}

C++: #include <iostream>
#include <algorithm>
using namespace std;
    
int main(){
	int data,m[10];

	while(cin >> data)
	{
		for (int j=0;j<=9;j++){
			
			if (data<=10000 && data >= 0) 
			m[j]=data;
		}


for (int j=0;j<=9;j++){
for (int i=0;i<=9;i++){

	if (m[i] <= m[i+1])
		std::swap(m[i],m[i+1]);

}
}
 
for (int i=0;i<=9;i++){
cout <<  m[i] <<'\n';
}

    return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;

int main(void)
{
	
	int n;
	int Max1,Max2,Max3;
	Max1=0;
	Max2=0;
	Max3=0;
	
	for(int i=0;i<=9;i++){
		cin>>n;
		if(n>=Max1){
			Max3=Max2;
			Max2=Max1;
			Max1=n;
		}
		else if(n>=Max2){
			Max3=Max2;
			Max2=n;
		}
		else if(n>=Max3){
			Max3=n;
		}
		else{
		}
		/*cout<<Max1<<endl;
		cout<<Max2<<endl;
		cout<<Max3<<endl;*/
	}
	cout<<Max1<<endl;
	cout<<Max2<<endl;
	cout<<Max3<<endl;
}

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

int main(){
int a[10];

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

sort(a,a+10);

for(int i=9;i>=7;i--){
cout << a[i] <<endl;
}

return 0;
}

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

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

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

C++: #include<bits/stdc++.h>
#include<vector>
#include<list>
#include<stack>
#include<queue>
#include<algorithm>
using namespace std;

/**
 * vector<int>ar(3);
 * for(auto&e:ar){
 *     scanf("%d",&e);
 * }
 * sort(ar.begin(),ar.end())
 * int sum=accumulate(ar.begin(),ar.end(),0);
 **/

int main(){
    int mod=1000000007;
    int n,m;
    vector<int> l(10);
    for(auto&e:l) {
        scanf("%d",&e);
    }
    sort(l.begin(),l.end());
    for(int i=9;i>6;i--) {
        printf("%d\n",l[i]);
    }
    return 0;
}

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

int main(){
    vector<int> takasa(10);
    for(int i = 0; i < 10 ; ++i){
        cin >> takasa.at(i);
    }
    std::sort(takasa.begin(),takasa.end());
    std::sort(takasa.begin(),takasa.end(),std::greater<int>());
    for(int i=0;i<3;++i){
        cout<<takasa.at(i)<<endl;
    }
}

C++: 
#include <iostream>
#include <string.h>

using namespace std;

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

    for(int j=0;j<10;j++){
        if(a[j]>a[j+1]){
            temp = a[j];
            a[j] = a[j+1];
            a[j+1] = temp;
        }

    }

    cout<<a[9]<<endl;
    cout<<a[8]<<endl;
    cout<<a[7]<<endl;
    return 0;
}

C++: #include <stdio.h>

int main(void)
{
	int sort[3] = {0, 0, 0};
	int i;
        int temp;
	
	for(i = 0; i < 10; i++){
                scanf("%d", &temp);
		if(tall[i] > sort[0]){
			sort[2] = sort[1];
			sort[1] = sort[0];
			sort[0] = tall[i];
		}
		else if(tall[i] > sort[1]){
			sort[2] = sort[1];
			sort[1] = tall[i];
		}
		else if(tall[i] > sort[2]){
			sort[2] = tall[i];
		}
	}
	printf("%d\n%d\n%d\n", sort[0], sort[1], sort[2]);
	
	return 0;
	
}