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.Ints(mountains)
	for _, v := range mountains[7:]{
		fmt.Fprintln(out, v)
	}
}

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

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

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;

}

C++: #include <iostream>
#include <cstdio>
#include <algorithm>
#include <cassert>
#include <vector>
#include <string>
#include <cmath>
#include <map> 
#include <sstream>
#include <cstdio>
#include <complex>
#include <cstring>
using namespace std;
 
const int MAX= 10000100;

#define loop(i,a,b) for(int i = a ; i < b ; i ++)
#define rep(i,a) loop(i,0,a)
#define all(a) (a).begin(),(a).end()
#define ll long long int
#define gcd(a,b) __gcd(a,b)
#define pb(a) push_back(a)
int GCD(int a, int b) {if(!b) return a; return gcd(b, a%b);}
int lcm(int a, int b) {return a*b / gcd(a, b);}

int main(void){
  int a[10];
  rep(i,10)cin>>a[i];
  sort(a,a+10,greater<int>());
  rep(i,3)cout<<a[i]<<endl;
}

C++: #include<iostream>
using namespace std;
void output(int ab,int bc,int ca);
int main() {
	int mountain[10];
	int a, b, c;

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

	a = mountain[0];
	b = mountain[1];
	c = mountain[2];

	for (int y = 3; y <= 9; y++) {
		if (a <= b) {
			if (a <= c) {
				if (a < mountain[y]) {
					a = mountain[y];
				}
			}
			else {
				if (c < mountain[y]) {
					c = mountain[y];
				}
			}
		}
		else if (b <= c)
		{
			if (b < mountain[y]) {
				b = mountain[y];
			}
		}
	}
	if (a <= b) {
		if (a <= c) {
			if (b <= c) output(c, b, a);
			else output(b, c, a);
		}else output(b, a, c);
	}
	else if (a <= c) output(c, a, b);
	else if (b <= c) output(a, c, b);
	else output(a, b, c);
	char a____;
	cin >> a____;

	return 0;
}

void output(int ab, int bc, int ca) {
	cout << ab << "\n" << bc << "\n" << ca << "\n";
}

C++: #include<iostream>

using namespace std;

int main(){
  int outHigh[3],inHigh[10];
  int where;
  outHigh[0]=0;
  outHigh[1]=0;
  outHigh[2]=0;
  
  for(int i = 0; i < 10; i++){
    cout << "height of mountain "<<i<<" (integer)  ";
    cin >> inHigh[i];
    cout <<endl;
    }
  
  for(int j = 0; j < 3; j++){
    for(int i = 0; i < 10; i++){
      if(outHigh[j] < inHigh[i]){
	outHigh[j] = inHigh[i];
	where = i;
      }	
    }
    inHigh[where] = 0;
  }
  
  for(int i = 0; i < 3; i++){
    cout << outHigh[i]<<endl;
  }
  
}

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