Go: package main

import (
        "fmt"
        "bufio"
        "os"
        "strconv"
)

func main() {
        fp := os.Stdin
        scanner := bufio.NewScanner(fp)
        var lst [3]int

        for scanner.Scan() {
                num, _ := strconv.Atoi(scanner.Text())
                if lst[0] < num {
                        lst[2] = lst[1]
                        lst[1] = lst[0]
                        lst[0] = num
                } else if lst[1] < num {
                        lst[2] = lst[1]
                        lst[1] = num
                } else if lst[2] < num {
                        lst[2] = num
                }
        }

        for _, i := range lst {
                fmt.Printf("%d\n", i)
        }
}

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

int main() {
	int height[10];
	for (int i = 0; i < 10; i++) {
		cin >> height[i];
	}
	sort(height,height+10);
	for (int i = 9; i > 6; i--) {
		cout << height[i] << endl;
	}
}

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

int main(){
	list<int> height_list(10);

	for(int i=0; i<10; ++i){
		int height;
		cin >> height;
		height_list.push_back(height);
	}

	height_list.sort(greater<int>());
	list<int>::iterator ite = height_list.begin();
	for(int i=0; i<3; ++i){
		cout << *ite++ << endl;
	}
	return 0;

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

int i =0;
int nums[10000]={};

int main(){
while(scanf("%d",nums+i)!=EOF) i++;
sort(nums,nums+i);
for(int j =i-1,c=0;c++<3;j--) printf("%d\n",nums[j]);
    return 0;
}

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

int main() {
	int h[10],max;
	for (int i = 0; i < 10; i++) {
		cin >> h[i];
	}
	
	for (int j = 0; j < 3; j++) {
		max = 0;
		for (int i = 1; i < 10; i++) {
			if (h[max] < h[i])
				max = i;
		}
		cout << h[max] << "\n";
		h[max] = -1;
	}
	return 0;
}

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

int main(void) {
    std::priority_queue<int> heights;
 
    for (int h, i = 0; i < 10; ++i) {
        std::cin >> h;
        heights.push(h);
    }
 
    for (int i = 0; i < 3; ++i) {
        std::cout << heights.top() << std::endl;
        heights.pop();
    }

    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>

int main()
{
	int high[10] = {1819,2003,876,2876,1723,1673,3776,2848,1592,922};
	int cases;
	
	for(int i=0;i<9;i++)
	{
		for(int j=i+1; j<10; j++)
		{
			if(high[i] < high[j])
			{
				cases = high[i];
				high[i] = high[j];
				high[j] = cases;
			}
		}
	}
	
	printf("%d",high[0]);
	printf("%d",high[1]);
	printf("%d",high[2]);
	
	return 0;
}

C++: #include<stdio.h>
#include<math.h>
#include<iostream>
using namespace std;

int main() {
	int i, j, a[10] = {0}, temp;
	for (i = 0; i < 10; i++) {
		cin >> a[i];
	}
	for (i = 0; i < 10; i++) {
		for(j = 0; j < 10; j++) {
			if (a[j] > a[i]) {
				temp = a[j];
				a[j] = a[i];
				a[i] = a[j];
			}
		}
	}
	for (i = 9; i > 6; i--) {
		cout << a[i] << endl;
	}
	return 0;
}

C++: #include <cstdio>
#include <iostream>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <cctype>
#include <algorithm>
#include <string>
using  namespace  std;
int main()
{
    long long int ar[12];
    for(int i=0;i<10;i++)
        cin>>ar[i];
    sort(ar,ar+10);
    cout<<ar[9]<<'\n'<<ar[8]<<'\n'<<ar[7]<<'\n';
    return 0;
}

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

int main(){
    vector<int> v;
    int num;
    for(int i = 0;i<10;i++){
        cin>>num;
        v.push_back(num);
    }

    sort(v.begin(),v.end(),greater<int>());
    


    for(int i = 0;i<3;i++)
        cout<<v.at(i);
    return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int i,j,n,temp;
	int data[10];
	n = 1;
	for(i=0; i<10; i++){
		printf("山の高さ%d ",n);
		n++;
		scanf("%d",&data[i]);
	}

	for(i=0; i<9; i++){
		for(j=i+1; j<10; j++){
			if(data[i] > data[j]){
				temp=data[i];
				data[i]=data[j];
				data[j]=temp;
			}
		}

	}

		printf("最も高い山の高さ %d\n",data[9]);
		printf("2番目に高い山の高さ %d\n",data[8]);
		printf("3番目に高い山の高さ %d\n",data[7]);
	return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
    int h[10];
    for(int i=0;i<10;i++){
        cin >> h[i];
    }
    for(int s=0;s<9;s++){
        for(int t=s+1;t<10;t++){
            if(h[s]<h[t]) swap(h[s],h[t]);
        }
    }
    cout << h[0] << "\n" << h[1] << "\n" << h[2] <<endl;
    return 0;
}

C++: #include<iostream>
using namespace std;
   
int main(void){
   
  int h[10];
  int a = 0;
   

    for(int i=0; i<10; i++){
      cin >> h[i]; 
    }
   
  for(int j=0; j<3; j++){
    for(int i=0; i<10; i++){
        if(h[a]<h[i]) a = i;
    }
    cout << h[a] << endl; 
    h[a] = 0;
  }  
   
  return 0;
}

C++: #include <stdio.h>

int main(){
	int i,j;
	int h1=0,h2=0,h3=0;
	
	for(i=1;i<=10;i++){
		scanf("%d\n",&j);
		if(j>=h1){
			h3=h2;
			h2=h1;
			h1=j;
		}
		else if(j>=h2){
			h3=h2;
			h2=j;
		}
		else if(j>=h3){
			h3=j;
		}
	}
	printf("%d\n%d\n%d\n",h1,h2,h3);
	return 0;
}

C++: #include <iostream>

using namespace std;

int main() {
    int top[3] {};

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

        if (h > top[2]) {
            if (h > top[1]) {
                top[2] = top[1];
                if (h > top[0]) {
                    top[1] = top[0];
                    top[0] = h;
                }
                else top[1] = h;
            }
            else top[2] = h;
        }

    }

    for (auto t : top) {
        cout << t << endl;
    }
}

C++: #include <iostream>

using namespace std;

int main()
{
   int mountain [10] = {100,400,550,800,150,700,1800,6000,7800,890};
   cout << mountain [8] << endl;
   cout << mountain [7] << endl;
   cout << mountain [6] << endl;


    return 0;
}

C++: #include<cstdio>
#define LOOP(i,f,t) for(int i=f;i<t;++i)
inline void swap(short&a,short&b){
  int t=a;a=b;b=t;
}
int main(){
  short h[10];
  LOOP(i,0,10)scanf("%d",h+i);
  LOOP(i,0,3){
    LOOP(j,i+1,10){
      if(h[i]<h[j])swap(h[i],h[j]);
    }
  }
  LOOP(i,0,3)printf("%d\n",h[i]);
}

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

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

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

int main(){
    int a=0, b=0, c=0, n;
    
    for(int i=0; i<10; i++){
        cin >> n;
        if(n>a){
            c=b; b=a; a=n;
        }else if(n>b){
            c=b; b=n;
        }else if(n>c) c=n;
    }
    cout << a << endl << b << endl << c << endl;
    
    return 0;
}