Go: // 九九を出すだけ
package main
import (
	"fmt"
	"os"
	"bufio"
	"strconv"
	"sort"
)

var sc = bufio.NewScanner(os.Stdin)
var out = bufio.NewWriter(os.Stdout)

func main(){
	sc.Split(bufio.ScanWords)
	defer out.Flush()
	mountains := make([]int, 10)
	for i:=0; i<10; i++{
		mountains[i]=nextInt()
	}
	sort.Sort(sort.Reverse(sort.IntSlice(mountains)))
	for _, v := range mountains[:3]{
		fmt.Fprintln(out, v)
	}
}

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

func nextInt() int{
	a, _ := strconv.Atoi(next())
	return a
}

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

int main(){
  int n[10];

  for(int i=0; i<10; i++) {
    cin >> n[i];
  }
  cout << "\n";

  sort(n, n+10);

  for(int j=0; j<3; j++) {
    cout << n[9-j] << "\n";
  }
  return 0;
}

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

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

using namespace std;

int m[10];

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

    sort(m, m + 10);
    
    printf("%d\n%d\n%d\n", m[9], m[8], m[7]);
}

C++: #include<stdio.h>

int main(){
	int a1 = 0, a2 = 0, a3 = 0;

	int x;
	for(int i = 0; i < 10; i++){
		scanf("%d\n", &x);
		if(x > a3){
			a3 = x;
		}
		if(x > a2){
			a3 = a2;
			a2 = x;
		}
		if(x > a1){
			a3 = a2;
			a2 = a1;
			a1 = x;
		}
	}

	printf("%d\n%d\n%d\n", a1, a2, a3);

	return 0;
}

C++: #include <iostream>
#define データ数 10

using namespace std;

int main(){

	int hight[10];
	int num;
	int baffer;
	int flag=1;

	for(num=0;num!=データ数;num++)
	{
		cin>>hight[num];
	};

	for(num=0;num!=データ数;num++)
	{
		if(hight[num]<hight[(num+1)]){

		baffer=hight[(num+1)];

		hight[(num+1)] = hight[num];
		
		hight[num] = baffer;
		
		flag++;}
		
		if(num==(データ数-2)){
			if(flag==0){break;}
			else{num=-1;flag=0;};

		};
	};

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

return 0;
}

C++: #include <iostream>
using namespace std;
int mt[10];
int main()
{
    for (int i = 0; i < 10; i++)
        cin >> mt[i];
    for (int t = 1; t <= 3; t++)
    {
        int maxv = -1, mark = 0;
        for (int i = 0; i < 10; i++)
        {
            if (mt[i] > maxv)
            {
                maxv = mt[i];
                mark = i;
            }
        }
        cout << maxv << endl;
        mt[mark] = -100;
        maxv = -1;
        mark = 0;
    }
    return 0;
}

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

int main()
{
	int h;
	int mh[3] = {0};

	for(i=0;i<10;i++){
		cin<<h;
		if(mh[0] < h) mh[0] = h;
		else if(mh[1] < h) mh[1] = h;
		else if(mh[2] < h) mh[2] = h;

	}
        
        for(i=0;i<3;i++)	cout<<mh[i]<<endl;

	return 0;
}

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

void swap(int& x, int& y){
    int t = x;
    x = y;
    y = t;
}
int main(){
    int height[10];
    //入力
    cout << "Write heights of 10 mountain\n";
    for(int i = 0;i < 10;i++){
        cin >> height[i];
        if(height[i] < 0 || height[i] > 10000){
            cout << "incorrect height of mountain\n";
            i--;
        }
    }
    //ソート
    cout << "sorting　";
    for(int i = 0;i < 10;i++){
        for(int j = i;j > 0;j--){
            if(height[j] > height[j-1]){
                swap(height[j], height[j-1]);
            }
        }
    }
    //出力
    cout << "result\n";
    for(int i = 0;i < 3;i++){
        cout << height[i] << "\n";
    }
    return 0;
}

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

int 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];
    return 0;
}

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

class top3
{
private:
	int idx;
	int x;
	int y;
	int hill[10];
	int top[3];
public:
	void empty(){
		idx=0;
		y=0;
		x=10;
	}
	void push(int v){
		hill[idx++]=v;
	}
	int pop(){
		int i;
		top[y]=hill[i];
		for(i=0;i<x;i++){
			
			if(hill[i]>top[y]) {top[y]=hill[i];
		}
		x--;
		return top[y++];
	
	};
	
};
int main(){

	top3 a;
	int n,v;
	cin>>n;
	a.empty();
	for(int i=0;i<n;i++){
		cin>>v;
		a.push(v);
	}
	for(int i=0;i<n;i++){
		cout<<a.pop()<<endl;
	}
	return 0;
}

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

using namespace std;

int main(){
	int mt[10];
	for(int i=0;i<10;i++){
		cin >> mt[i];
	}
	for(int i=0;i<3;i++){
		int *maxmt = &mt[0];//mtと同じ。ポインタにすることでアドレスと値を同時に見れる
		for(int j=0;j<10;j++){
			if(*maxmt < mt[j]){
				maxmt = &mt[j];
			}
		}
		cout << *maxmt << endl;
		*maxmt = 0;
	}
	return 0;
}

C++: #include<iostream>

using namespace std;

int main() {
	int Mt[10];

	for (int i = 0; i < 10; i++)
		cin >> Mt[i];

	int cnt;
	do{
		cnt = 0;
		for (int j = 0; j < 9; j++) {
			if (Mt[j] < Mt[j + 1]) {
				int tmp = Mt[j];
				Mt[j] = Mt[j + 1];
				Mt[j + 1] = tmp;
				cnt++;
			}
		}
	} while (cnt != 0);

	for (int k = 0; k < 3; k++)
		cout << Mt[k] << endl;

	return 0;
}

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

int main() {

	unsigned int height[10];

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

	sort(height, height + 10);

	cout << height[9] << endl;
	cout << height[8] << endl;
	cout << height[7] << endl;

	return 0;
}

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

int main(){
	int suchi,high=0,middle=0,low=0,i,flag=0,a,b,c;
	
	for(i=0;i<10;i++){
		cin>>suchi;
			
		if(flag==0){
			high = suchi;
			flag++;
			}
			
		else{
			if(suchi<low)
			
			else if(suchi>=low&&suchi<middle)
				low = suchi;
			
			else if(suchi>=middle&&suchi<high){
				low = middle;
				middle = suchi;
			}
			
			else{
				low = middle;
				middle = high;
				high = suchi;
				}
				
			}
	}
	
	cout<<high<<endl;
	cout<<middle<<endl;
	cout<<low<<endl;
	
	return 0;
}

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

C++: #include <stdio.h>

int main(void)
{
	int m[10];
	int max1 = 0, max2 = 0, max3 = 0;
	int i;
	
	for (i = 0; i < 10; i++){
		scanf("%d", &m[i]);
	}
	
	for (i = 0; i < 10; i++){
		if (max1 <= m[i] || max2 <= m[i] || max3 <= m[i]){
			/*max1 = m[i];
			max2 = max1;*/
			max3 = max2;
			max2 = max1;
			max1 = m[i];
			
		}
	}
	
	printf("%d\n%d\n%d\n", max1, max2, max3);
	
	return (0);
}

C++: #include<iostream>
using namespace std;
int main(){
int input[10];
int first;
int second;
int third;
for(int i=0,i<10,i++){
cin>>input[i];
if(first<input){first = input[i];}else 
if(second<input){second = input[i];}else 
if(third<input){third = input[i];}
}
cout<<first<<endl;
cout<<second<<endl;
cout<<third<<endl;
return 0;

}

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

C++: #include<iostream>

int main(){
            int a[10],i,j,n;
          
 
for(i=0,i<10,i++){
                std::cin>>a[i];
                          }
for(i=0,i<10,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<iostream>
#include<algorithm>
#include<iterator>
#include<vector>
using namespace std;
int main(){

vector<int> v;

for(int i=0;i<10;i++){

int j;
cin>>j;
v.push_back(j);


}

sort(v.begin(),v.end());

cout<<v[9]<<endl<<v[8]<<endl<<v[7]<<endl;

}