Go: package main

import (
	"fmt"
	"sort"
)

func main() {
	mountains := make([]int, 10, 10)

	for i := 0; i < 10; i++ {
		fmt.Scan(&mountains[i])
	}

	sort.Sort(sort.Reverse(sort.IntSlice(mountains)))

	for i := 0; i < 3; i++ {
		fmt.Println(mountains[i])
	}
}

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

C++: #include<iostream>
using namespace std;
int main(){
	int ar[10],r[3],t=10;
	for(int i=0;i<10;i++)
		cin>>ar[i];
	for(int i=0;i<10;i++)
		for(int j=0;j<9;j++)
		if(ar[i]>ar[j]){
			int t;
			t=ar[i];
			ar[i]=ar[j];
			ar[j]=t;
		}
	for(int i=0;i<3;i++)
		cout<<ar[i]<<endl;
	return 0;
}

C++: #include<stdio.h>

int main(void){

	int h[10]/*={1819,2003,876,2840,1723,
		           1673,3776,2848,1592,922}*/;
	
	int i,j,t;
	for(i=0;i<10;i++){
		printf("山の高さ(整数）>>%d",i+1);
		scanf("%d",&h[i]);
	}
	for(i=0;i<9;i++)
	{
		for(j=i;j<10;j++)
		{
			if(h[i]<h[j])
			{
			   t=h[i];
			   h[i]=h[j];
			   h[j]=t;
			}
		}
	}
	for(i=0;i<3;i++)
	{
		printf("%d\n",h[i]);
	}


	return 0;
}

C++: #include <iostream>

using namespace std;

int main()
{
	int i,moun,high[10000],j=0;
	for(i=0;i<10000;i++)
	{
		high[i] = 0;
	}
	for(i=0;i<10;i++)
	{
		cin >> moun;
		high[moun] = 1;
	}
	for(i=9999;i>=0;i--)
	{
		if(high[i] == 1)
		{
			cout << i << endl;
			j++;
		}
		if(j == 3)
		{
			break;
		}
	}
	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<<a[8]<<endl<<a[7]<<endl;
	return 0;
}

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

int main(){
	int a[10],b[3],i;

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

		if(i==0)
			b[0]=a[i];
		if(a[i]>=b[0])
		{
			b[2]=b[1];
			b[1]=b[0];
			b[0]=a[i];

		}

		if(a[i]<b[0] && a[i]>=b[1])
		{
			b[2]=b[1];
			b[1]=a[i];
		}

		if(a[i]<b[0] && a[i]<b[1] && a[i]>=b[2])
		{
			b[2]=a[i];
		}

	}

	for(i=0;i<3;i++)
	{
		cout<<b[i]<<'\n';
	}

    return 0;
}

C++: #include <iostream>

using namespace std;

int main() {
	/* ?????????????±±?????° */
	const int len = 5;
	/* ?????????????±±?????°(???????????????) */
	int out = 3;

	int arr[len];

	for (int i = 0; i < len; i++)
		cin >> arr[i];

	// ??????????????????
	for (int i = 0; i < len; i++)
		for (int j = 0; j < len; j++)
			if (arr[i] < arr[j])
				swap(arr[i], arr[j]);

	cout << endl;

	for (int i = len - 1; len - (1 + out) < i; i--)
		cout << arr[i] << endl;

	return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
	int m[10];
	for(int j=0 ; j<10 ; j++){
		cin >> m[j];
	}

	sort(m,m+10);
	
	for(int i=9 ; i>=7 ; i--){
		cout << m[i] << endl;
	}

	return 0;
}

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

int main(){
	int h[10];
	for (int i = 0; i < 10; i++){
		cin >> h[i];
	}
	int n = 0;
	int a = 0;
	while (n == 0){
		n++;
		for (int i = 0; i < 9; i++){
			
			if (h[i]<h[i + 1]){
				a = h[i];
				h[i] = h[i + 1];
				h[i + 1] = a;
				n = 0;
			}
		}
	}
	for (int i = 0; i < 3; i++){
		cout << h[i]<< '\n';
	}
	return 0;
}

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

int Size = 10;

int main(void) {
    int height[Size] = {0};
    
    for(int i = 0; i < Size; ++i) {
        while(!(0 <= height[i] && height[i] <= 10000)) {
            cout << "No." << i + 1 << " : " << flush;
            cin >> height[i];
        }
    }
    sort(height, height + Size);
    
    cout << height[9] << endl
         << height[8] << endl
         << height[7] << endl;
}

C++: num=[]
for i in 0..9
num[i]=gets.to_i
end
for i in 0..2
ans=0
for j in 0..9
if ans<num[j]
ans=num[j]
set=j
end
end
puts ans
num[set]=0
end

C++: #include <stdio.h>

int main(void)
{
	int m[10];
	int temp;
	int i,j,n;

	n=10;
	for(i=0; i<n; i++){
	scanf("%d",&m[i]);
	if(0>m[i]||m[i]>10000)
	  {
	    printf("error\n");
	      return 1;
	  }
	}

	for(i=0; i<n-1; i++)
	{
		 for(j=i+1; j<n; j++)
		 {
			if(m[j] > m[i])
			{
				temp=m[j];
				m[j]=m[i];
				m[i]=temp;
			}
		}
	}

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

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

using namespace std;

void solve()
{
	vector<int> Height(10);
	for(int i = 0; i < 10; ++i)
	{
		cin >> Height[i];
	}
	sort(Height.begin(), Height.end());
	for(int i = 9; i > 6; --i)
	{
		cout << Height[i] << endl;
	}
}

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

C++: #include<iostream>
#include<array>
#include<algorithm>
int main(void){
std::array<int,10> h;
int tmp;
for(auto& e : h){
std::cin>>e;
}
std::sort(h.begin(),h.end());
for(int i=0;i<3;i++){
std::cout<<h[i]<<std::endl;
}

return 0;
}

C++: #include <stdio.h> #include <functional> #include <algorithm>int main(){ int mt[10], i; std::sort(mt, mt + 10, std::greater<int>); for (i = 0; i < 3; i++) printf("%d", mt[i]);return 0; }

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

int main()
{
	std::vector<int> vec(10);
	for (int i = 0; i < 10; ++i) {
		std::cin >> vec[i];
	}
	std::partial_sort(
			vec.begin(), vec.begin() + 2, vec.end(),
			std::greater<int>());
	for (int i = 0; i < 3; ++i) {
		std::cout << vec[i] << std::endl;
	}
	return 0;
}

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

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

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

		cin>>h;
		if(0<=h && h<=10000)
		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>
#include<algorithm>
using namespace std;
int main()
{
    int a[10],i;
    for(i=0;i<10;i++)cin>>a[i];
    sort(a,a+10);
    for(i=9;i>6;i--)cout<<a[i]<<endl;
    return 0;
}

C++: #include<iostream>

using namespace std;

//??\?????????
void swap(int *a, int *b){
	int temp = *a;
	*a = *b;
	*b = temp;
}

int main(){
	int str,mt[10];
	int i;
	
	for(i=0;i<10;i++){
		cin >> str;
		mt[i] = str;
	}
	
	// sort
	int num = 1;
	while(num<=3){
		str = mt[num-1];
		for(i=num;i<10;i++){
			if(str<mt[i]){
				str = mt[i];
				swap(mt[num-1],mt[i]);
			}
		}
		cout << mt[num-1] << "\n";
		num++;
	}
	
	return 0;
}

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

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

C++: #include <iostream>
int main(){
	int a,b,c;
		for(a=1;a<10;++a){
			for(b=1;b<10;++b){
				c=a*b;
				std::cout<<a<<"x"<<b<<"="<<c<<std::endl;
				}
		}
	 return 0;
	}

C++: #include <iostream>
#include <cmath>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <sstream>
#include <string>
#include <cstdlib>
using namespace std;

template <class T> int streamvar(std::istream& in, T& var)
{
    if (!in) {
        return 1;
    }
    in >> var;
    if (in.fail()) {
        return 1;
    }
    return 0;
}
template <class T> int streamvec(std::istream& in, std::vector<T> &v)
{
    v.clear();
    string s;

    if (!in) {
        return 1;
    }
    getline(in, s);
    if (in.fail()) {
        return 1;
    }
    istringstream is(s);
    while (1) {
        T tmp;
        is >> tmp;
        if (is.fail())
            break;
        v.push_back(tmp);
    }
    return 0;
}

int main(void)
{
    vector<int> v;
    int tmp;
    while (!streamvar(cin, tmp)) {
        v.push_back(tmp);
    }
    sort(v.begin(), v.end(), greater<int>());
    for (int i = 0; i < 3; i++) 
        cout << v[i] << endl;
    return 0;
}