Go: package main

import "fmt"

func main() {
	var height int
	topHeights := [5]int{}

	for i := 0; i < 10; i++ {
		fmt.Scan(&height)

		for j := 0; j < 3; j++ {
			if topHeights[j] < height {
				topHeights[j+2] = topHeights[j+1]
				topHeights[j+1] = topHeights[j]
				topHeights[j] = height
				break
			}
		}
	}

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

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

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

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

#define pb push_back
#define fr first
#define sc second
typedef pair<int,int> pii;
typedef vector<int> vi;
const int INF = (1<<25);
const int dx[]={1,0,-1,0},dy[]={0,-1,0,1};

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

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

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

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

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

int main()
{
  int high;
  int temp1,temp2;
  int first=0,second=0,third=0;
  
  for(int i=0;i<10;i++){
    cout<<"山の高さ"<<i<<":";
    cin>>high;
    if(high>first){
      temp1=first;
      first=high;
      temp2=second;
      second=temp1;
      third=temp2;
    } else if (first>high && high>second){
      temp2=second;
      second=high;
      third=temp2;
    } else if (second>high && high>third){
      third=high;
    }
  }

  cout<<"1番目に高い山の高さ:"<<first<<endl;
  cout<<"2番目に高い山の高さ:"<<second<<endl;
  cout<<"3番目に高い山の高さ:"<<third<<endl;
  
  return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int a, b, max = 0, max2 = 0, max3 = 0;
	for (a = 1; a <= 10; a++) {
		scanf("%d", &b);
		if (b > max) {
			max = b;
		}
		else if (b > max2) {
			max2 = b;
		}
		else if (b > max3) {
			max3 = b;
		}
	}
		printf("%d\n %d\n %d\n", max, max2, max3);
		return 0;
}

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

C++: #include<iostream>
int main(){
	int a[10];
	for(int i=0;i<10;i++){
		scanf("%d",&a[i]);
		}
		int first=-1;
		int second=-1;
		int third=-1;
		for(int j=0;j<10;j++){
			if(a[j]>first){
				first=a[j];
			}
			else if(a[j]>second){
				second=a[j];
			}
			else if(a[j]>third){
				third=a[j];
			}
			cout<<first<<endl;
			cout<<second<<endl;
			cout<<third<<endl;
		}
		return 0;
}

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

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

using namespace std;

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

C++: #include<stdio.h>
#include<iostream>

using namespace std;

int MAX(int a,int b){
	if(a>b) return a;
	else return b;
}

int MIN(int a,int b){
	if(a>b) return b;
	if(a<b) return a;
	else return b;
}


int main(){
	int moun[11];
	for(int i=0;i<10;i++)
		cin>>moun[i];
	int no1,no2,no3,n=0,p=0,w=0;
	
	no1=MAX(moun[n],moun[n+1]);
	for(n=2;n<10;n++)
		no1=MAX(no1,moun[n]);

	for(int o=0;o<10;o++){
		if(no1==moun[o]){
			moun[o]=0;
			break;
		}
	}

	no2=MAX(moun[p],moun[p+1]);
	for(p=2;p<10;p++)
		no2=MAX(no2,moun[p]);

	for(int q=0;q<10;q++){
		if(no2==moun[q]){
			moun[q]=0;
			break;
		}
	}

	no3=MAX(moun[w],moun[w+1]);
	for(w=2;w<10;w++)
	no3=MAX(no3,moun[w]);

	for(int l=0;l<10;l++){
		if(no3==moun[l]){
			moun[l]=0;
			break;
		}
	}
	cout<<no1<<" "<<no2<<" "<<no3<<"\n";

	return 0;
}

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

template <typename T> void b_sort(T* a , int n){
	int i , j;
	for(i=1;i<n;i++){
		for(j=n-i-1;j>=0;j--){
			if(a[j]<a[j+1]){
				a[j]^=a[j+1];
				a[j+1]^=a[j];
				a[j]^=a[j+1];
			}
		}
	}	
} 

int main(){
	unsigned int m[10];
	for(int i=0;i<10;++i){
		cin >> m[i];
	}
	b_sort(m , 10);
	cout << m[0] << "\n" << m[1] << "\n" << m[2] << endl;
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
bool cmp(int a, int b){
	return a < b;
}
vector<int> ans;
int main(){
	int h;
	for(int i = 1; i <= 10; i++){
		cin >> h;
		ans.push_back(h);
	}
	sort(ans.begin(), ans.end(), cmp);
	for(int j = 9; j >= 7; j--)
		cout << ans[j] << endl;
	return 0;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
 
int main(){
    vector<int> h{};
    int in{};
    for(int i=0;i<10;i++){
        cin>>in;
        h.push_back(in);
    }
    sort(h.begin(),h.end());
    cout<<h[9]<<endl;cout<<h[8]<<endl;cout<<h[7]<<endl;
    return 0;
}

C++: #include<stdio.h>

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

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

	return 0;
}

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

int main()
{
	int data[10];
	for (int i = 0; i < 10; ++i) {
		cin >> data[i];
	}
	int max[3] = { 0 };
	int n = 0, i = 0, temp;
	while (n < 3) {
		if (max[n] < data[i]) {
			max[n] = data[i];
			temp = i;
		}
		++i;
		if (i == 10) {
			data[temp] = 0;
			++n;
			i = 0;
		}
	}

	cout << max[0] << endl << max[1] << endl << max[2] << endl;
	
	return 0;
}

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

int main(){

int i,j,h,temp;
int m[10];



//入力
for(i=0; i<10; i++){
   cout << "height of mountain " << i+1 << "(0 <= height of mountain <= 10000):";
   cin >> h;

   if(h >= 0 and h <= 10000){
       m[i]=h;
   }else{
   cout << "0 <= height of mountain <= 10000を満たしておりません。もう一度入力してください。\n";
   i--;
   }
}



//ソート
    for (i = 0; i < 9; i++) {
        for (j = 9; j > i; j--) {
            if (m[j - 1] > m[j]) {  
                temp = m[j];  
                m[j] = m[j - 1];
                m[j - 1] = temp;
            }
        }
    }
    
    
//出力
cout << "result\n";
for (i = 9; i > 6; i--) {
   cout << m[i] << "\n";
}

    return 0;
}

C++: #include<stdio.h>

int main(void){
  int a,b,c,d,i;  
  a=b=c=d=0;
  for(i=0;i<10;i++){
    scanf("%d",&a);
    if(a>d)//first
      {
     
     
        b=c;
	c=d;      
d=a;}
    else if(a>c)
      {
      b=c;
      c=a;   }
    else if(a>b)
      { b=a;}
      

  }
    
printf("\n\n\n\n%d\n%d\n%d\n",d,c,b); 
 return 0;
}

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

int main(){
	int x[10];
	for (int i = 0; i < 10; i++){
		cin >> x[i];
	}
	sort(begin(x), end(x));
	cout << x[9];
	cout << x[8];
	cout << x[7];
	
}

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

int main() {
    std::array<int, 10> arr;

    for (int i = 0; i < 10; ++i) {
        std::cin >> arr[i];
    }
    
    std::sort(arr.begin(), arr.end(), std::greater<int>());
    
    std::cout << arr[0] << std::endl;
    std::cout << arr[1] << std::endl;
    std::cout << arr[2] << std::endl;

    return 0;
}

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