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 <iostream>
using namespace std;
int main(void){
    int x = 0; 
    int rank01 = 1;
    int rank02 = 2;
    int rank03 = 3;
    
    for(int i = 0; i < 10; i++){
        cin >> x;
        if(rank01 < x){
            rank03 = rank02;
            rank02 = rank01;
            rank01 = x;
        }
        else if(rank02 < x){
            rank03 = rank02;
            rank02 = x;
        }
        else if (rank03 < x){
            rank03 = x;
        }
    }
    
    std::cout << rank01 << std::endl<< rank02 << std::endl << rank03 << std::endl; 
    
    return 0;
}

C++: #include<stdio.h>

int main(void)
{
	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 h1 = 0, h2 = 0, h3 = 0;
	int hdata[10];
	for (int n = 0; n < 10; n++) {
		cin >> hdata[n];
		if (hdata[n] > h1)
			h1 = hdata[n];
	}
	for (int n = 0; n < 10; n++) {
		if (hdata[n] > h2 && h1 != hdata[n])
			h2 = hdata[n];
	}
	for (int n = 0; n < 10; n++) {
		if (hdata[n] > h3 && h1 != hdata[n] && h2 != hdata[n])
			h3 = hdata[n];
	}

	cout << h1 << endl << h2 << endl << h3 << endl;
}

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

using namespace std;

int main()
{
	vector<int> data;
	int temp;

	for (int ix = 0; ix != 10; ++ix){
		cin >> temp;
		data.push_back(temp);
	}

	sort(data.begin(), data.end(), greater<int>());
	for (int ix = 0; ix != 3; ++ix)
		cout << data[ix] << endl;

	return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
	int a[10],f=0,s=0,t=0;
	for(int i=0;i<=9;i++){
		cin>>a[i];
		if(a[i]>t){
			t=a[i];
			if(s<t){
				swap(s,t);
				if(f<s){
					swap(f,s);
				}
			}
		}
	}
	cout<<f<<endl<<s<<endl<<t<<endl;
}

C++: #include <cstdio>
#include <functional>
#include <algorithm>
 
#define SIZE 10
#define MAX 10000
#define TOP 3
 
using namespace std;
 
int main() {
 int i = 0;
 int buf;
 int height[SIZE];
  
 while(i < SIZE) {
  scanf("%d", &buf);
   
  height[i] = buf;
 
  ++i;
 }
 
 sort(height, height + SIZE, greater<int>());
 
 for(i = 0; i < TOP; ++i) {
  printf("%d\n",height[i]);
 }
 
 return 0;
}

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

int main(){
  int a[10];
  int f=0,s=0,t=0;
  cin>>a[0];
  f=a[0];
  for(int i=1;i<10;i++){
    cin>>a[i];
    if(a[i]>=f){
      s=f;
      f=a[i];}
      else if(a[i]>=s){
	t=s;
	s=a[i];}
	else if(a[i]>=t){
	  t=a[i];}
  }
  cout<<f<<endl;
  cout<<s<<endl;
  cout<<t<<endl;
      
    
    
    

  return 0;
}

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

int main(){
	int high[10];
	bool flag;
	for(int i = 0 ; i < 10 ; i++){
		cin >> high[i];
	}

	do{
		flag = false;
		for(int i = 0 ; i < 9 ; i++){
			if(high[i] < high[i+1]){
				int hold = high[i+1];
				high[i+1] = high[i];
				high[i] = hold;
				flag = true;
			}
		}
	}while(flag == true);

	cout << high[0] << endl;
	cout << high[1] << endl;
	cout << high[2] << endl;

    return 0;
}

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

C++: #include<iostream>

using namespace std;

int main()
{
	int high[10] = { };
	int first = 0, second = 0, third = 0;
	
	for(int i = 0; i < 10; i++){
		cin >> high[i];
		
		if(first <= high[i]){
			second = first;
			first = high[i];
		}
		else if(second <= high[i]){
			third = second;
			second = high[i];
		}
		else if(third <= high[i])
			third = high[i];
	}
	
	cout << first << endl << second << endl << third << endl;
	
	
	return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int i,j,temp,y[10];
	for(i=0;i<10;i++){
		scanf("%d",&y[i]);
	}
	for(i=0;i<10;i++){
		for(j=0;j<=10;j++){
			if(y[j]<=y[i]){
				temp=y[i];
				y[i]=y[j];
				y[j]=temp;
			}
		}
	}
	for(i=0;i<3;i++){
		printf("%d\n",y[i]);
	}
	return 0;
}

C++: #include <iostream>
#include <math.h>
#include <stdio.h>
#include <string>
#include <string.h>
#include <algorithm>

using namespace std;

int main (void)
{
	int a[10],a1,a2,a3;
	a1 = 0;
	a2 =0;
	a3 = 0;

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

	for (int  i = 0; i < 10; i++)
	{
		if (a[i] >= a1)
		{
			a3 = 0;
			a3 = a2;
			a2 = 0;
			a2 = a1;
			a1 = 0;
			a1 = a[i];

		}
		else if (a2 <= a[i])
		{
			a3 = 0;
			a3 = a2;
			a2 = 0;
			a2 = a[i];
		}
		else if (a[i] >= a3)
		{
			a3 = 0;
			a3 = a[i];
		}

	}
	cout << a1 << endl << a2 << endl << a3 << endl;
}

C++: #include <stdio.h>

int main(){
  int input, output[3]={}, i;
  
  for( i=0; i<10; i++){
    scanf("%d", &input);
    if( input > output[0]){
      output[2] = output[1];
      output[1] = output[0];
      output[0] = input;
    }else if( input > output[1]){
      output[2] = output[1];
      output[1] = input;
    }else if( input > output[2]){
      output[2] = input;
    }
  }

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

C++: #include <bits/stdc++.h>
#define FOR(i, a, b) for(int i = a; i < b; i++)
#define RFOR(i, a, b) for(int i = b; i >= a; i--)
#define REP(i, n) FOR(i, 0, n)
#define RREP(i, n) RFOR(i, 0, n)
#define VALL(v) v.begin(), v.end()
#define VSORT(v) sort(VALL(v));
using namespace std;
typedef vector<int> vi;

int main(){
    vi m(10);
    REP(i,10) cin >> m[i];
    VSORT(m);
    RFOR(i, 7, 9) cout << m[i] << 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[11];
	for(int i=0;i<10;i++){
		cin>>a[i];
	}
	sort(a,a+10);
	for(int i=9;i>=7;i--){
		cout<<a[i]<<endl;
	}
	return 0;
}

C++: #include <iostream>

using namespace std;

#define ARRAY_SIZE 10

void sort(int array[],int size){
    int tmp;
    for(int i=0;i<size;i++){
        for(int j=size-1;j>i;j--){
            if(array[j]>array[j-1]){
                tmp=array[j];
                array[j]=array[j-1];
                array[j-1]=tmp;
            }
        }
    }
}

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