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 <stdio.h>
main(){
  int h[10];
  int st,nd,rd,i;
  st = 0;
  nd = 0;
  rd = 0;
  for(i=0;i<10;i++){
    scanf("%d",&h[i]);
    if(h[i]>st){
      st = h[i];
    }else if(h[i]>nd){
      nd = h[i];
    }else if(h[i]>rd){
      rd = h[i];
    }
  }
  printf("%d\n%d\n%d\n",st,nd,rd);
}

C++: #include <stdio.h>
int main()
{
	int a[10];
	int i,j,k;
	for (i=0;i<10;i++)
			scanf("%d",&a[i]);
		for (i=0;i<9;i++)
		{
			for(j=i+1;j<10;j++)
			{
				if(a[j]>a[i])
				{
					k=a[i];
					a[i]=a[j];
					a[j]=k;
				}
			}
			if(i==2)
				printf("%d\n%d\n%d\n",a[0],a[1],a[2]);
		}
	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;//カウントの初期化
	}
	for(i=0;i<3;i++)
		cout<<a[i]<<endl;
	return 0;
}

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

using namespace std;

int main() {
	vector<int> heights;
	int meter;

	for(int index = 0; index < 10; ++index) {
		cin >> meter;
		heights.push_back(meter);
	}
	
	reverse(heights.begin(), heights.end());
	
	cout << heights[0] << endl;
	cout << heights[1] << endl;
	cout << heights[2] << endl;
	
	return 0;
}

C++: #include <stdio.h>

int main (void){
    int x1=0, x2 = 0, x3 = 0, input, s;

    for(s=0; s<10; s++){
        scanf("%d\n" ,&input);
        if(x1 < input){
            x3 = x2;
            x2 = x1;
            x1 = input;
        }else{
            if(x2 < input){
                x3 = x2;
                x2 = input;
            }else if(x3 < input) x3 = input;
        }
    }
    printf("%d\n%d\n%d\n",x1,x2,x3);
    return(0);
}

C++: #include <stdio.h>

int main() {
  int a[10];
  int i, j, index, max;
  int cnt = 0;

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

  max = a[0];
  
  while(cnt < 3) {
	for (i = 0; i < 10; i++) {
	  for (j = i + 1; j< 10; j++) {
		if(max < a[j]) {
		  max = a[j];
		  index = j;
		  break;
		}
	  }
	}
	printf("%d\n", max);
	a[index] = 0;
	max = 0;
	cnt++;
  }

  return 0;
}

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

int main(){
    int i;
    int mount[10];
    int *p=&mount[0];
    for(i=0;i<10;i++){
        scanf("%d\n",p);
        p++;
    }
    sort(mount,mount+10,[](int x,int y){return x>y;});
    printf("%d\n%d\n%d",mount[0],mount[1],mount[2]);
    return 0;
}

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

#define N 10

void hoge(){
	int i;
	int h[N];
	for(i=0;i<N;i++){
	 cin>>h[i];
	}
	sort(h);
	
	cout<<h[9]<<h[8]<<h[7]<<endl;
}

int main(){
	
	hoge();
	
	return 0;
}

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

int mountain[12];

int main() {
  for (int i = 0; i < 10; ++i){
    cin >> mountain[i];
  }
  sort(mountain,mountain+10);

  cout << mountain[9] << endl
  << mountain[8] << endl
  << mountain[7] << endl;
}

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

int main(){
    int mo[10];
    for (int i=0; i<10; i++) {
        cin>>mo[i];
    }
     for (int i=0; i<3; i++) {
        int idx = 0;
        for (int j=0; j<10; j++) {
            if (mo[j] > mo[idx]) {
                idx = j;
            }
        }
        cout << mo[idx] << endl;
        mo[idx] = 0;
    }

    return 0;
}

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

int main()
{
	int t1 = 0;
	int t2 = 0;
	int t3 = 0;
	for (int i = 0; i < 10; i++)
	{
		int h;
		cin >> h;
		
		if (t1 < h)
		{
			t3 = t2;
			t2 = t1;
			t1 = h;
		}
		else if (t2 < h)
		{
			t3 = t2;
			t2 = h;
			//t1
		}
		else if (t3 < h)
		{
			t3 = h;
		}
	}
	
	cout << t1 << endl;
	cout << t2 << endl;
	cout << t3 << endl;
	
	return 0;
}

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

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

int main() {

	int r[3] = {0, 0, 0};
	int h;

	for(int i = 0; i < 10; i++){
		cin >> h;
		if(h > r[0]){
			r[2] = r[1];
			r[1] = r[0];
			r[0] = h;
		}else if(h > r[1]){
			r[2] = r[1];
			r[1] = h;
		}else if(h > r[2]){
			r[2] = h;
		}
	}

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

	return 0;
}

C++: #include <iostream>
using namespace std;
#include <cstdio>
#include <string.h>
#include <stdlib.h>
#include <math.h>
int main(void)
{
   int i,j,k,l;
   int a,b,c,d;
   int memory[2];
   int height[10];
   int n;

   for(i=0;i<10;i++) cin >> height[i];
   
   for(i=0;i<9;i++) {
      for(j=9;j>i;j--) {
         if(height[j] > height[j-1]) {
            int tmp = height[j];
            height[j] = height[j-1];
            height[j-1] = tmp;
         }
      }
   }

   for(i=0;i<3;i++) cout << height[i] << "\n";
   return 0;
}

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

using namespace std;

int a[10],n;

bool cmp(int a,int b){
	return a > b;
}

int main()
{	
	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++: mt = list()
for i in range(10):
    mt.append(int(raw_input()))

mt = sorted(mt,reverse=True)
for i in range(3):
    print mt[i]

C++: #include<iostream>

int main(){
int high[10];
int highest[3];
for(int i=0;i<10;i++){
cin>>high[i];}
highest[0]=high[0];
for(int i=1;i<10;i++){
if(high[i]>highest[0]){
highest[2]=highest[1];
highest[1]=highest[0];
highest[0]=high[i];}
if(highest[0]>=high[i]&&high[i]>highest[1]){
highest[2]=highest[1];
highest[1]=high[i];}
if(highest[1]>=high[i]&&high[i]>highest[2]){
highest[2]=high[i];}}
for(int i=0;i<3;i++){
cout<<highest[i]<<endl;}}

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

int main()
{
    vector<int> moun(10);
    vector<int>::iterator it=moun.begin();
    while(it!=moun.end())
    {
        cin>>*it;
        it++;
    }
    it=moun.begin();
    sort(moun.begin(),moun.end(),greater<int>());
    while(it!=moun.begin()+3)
    {
        cout<<*it<<endl;
        it++;
    }
}

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

int main(){
	int nyuryoku,high,low,middle,flag;
	
	for(int i=0;i<10;i++){
	cin>>nyuryoku;
	if(flag==0){
	high = nyuryoku;
	}else{
	if(nyuryoku>low){
		if(nyuryoku>middle){
			if(nyuryoku>high){
				high = nyuryoku;
			}else{
				middle = nyuryoku;
		}else{	
			low = nyuryoku;
		}
		}
	}
}
	cout<<highendl<<endl;
	cout<<middle<<endl;
	cout<<low<<endl;
return 0;
}