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 <string>
#include <vector>
#include <algorithm>

using namespace std;

//int compare(int a, int b){
//    if (a>b) return b;
//    else return a;
//}
int main() {
    vector<int> array = {};
    int nb;
    for (int i = 0; i<10; i++) {
        scanf("%d", &nb);
        array.push_back(nb);
    }
    sort(array.begin(),array.end());
    reverse(array.begin(),array.end());
    for (int i = 0; i<3; i++){
        printf("%d\n", array[i]);
    }
}

C++: #include <iostream>
#include <algorithm>
#include <stdio.h>
#define pri(dt) printf("%d\n",dt)
#define RPE0(loopTotal)  for(int i=0;i<=(loopTotal);i++)
#define RPE(loopTotal)  for(int i=1;i<=(loopTotal);i++)

int data[9];

using namespace std;
int main(void){
    
    RPE0(9) scanf("%d",&data[i]);
    sort(data,data+9,greater<int>());
    RPE0(2) pri(data[i]);
data[] = {0};
}

C++: #include <iostream>
#include <string>
using namespace std;
 
int main(){
int rank[3],a[10],i = 0,ii = 0;
rank[0] = 0;
rank[1] = 0;
rank[2] = 0;
while(i <= 9){
	cin >> a[i];
	while(ii <= 2){
		if(rank[ii] < a[i]){
			if(ii != 2){
			rank[ii+1] = rank[ii];
			rank[ii] = a[i];
			}
			break;
		}
		ii++;
	}
i++;
ii = 0;

}
cout<<rank[0]<<endl<<rank[1]<<endl<<rank[2]<<endl;




}

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

int main() {
    std::vector<int> hills;
    for (int i = 0; i < 10; i++) {
        std::cout << i << std::endl;
        std::string input;
        std::cin >> input;
        int height = std::stoi(input);
        hills.push_back(height);
    }

    std::sort(hills.begin(), hills.end(), std::greater<int>());
    for (int i = 0; i < 3; i++) {
        std::cout << hills[i] << std::endl;
    }

    return 0;
}

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

int main(){

	int hill[]={0,0,0,0,0,0,0,0,0,0};

	for(int j=0;j<=9;j++){
		cin>>hill[j];
	}

	int key;
	int flag;

	//sort
	for(key=9;key>=0;key--){

		for(int i=0;i<=key;i++){
			if(hill[i]>hill[i+1]){
				flag=hill[i];hill[i]=hill[i+1];hill[i+1]=flag;
			}
		}

	}

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

	return 0;

}

C++: class Main {
	public static void main(String[] args) {
		int a = 0,b = 0,c = 0,i,j;
		for(i = 0; i < 10; i++) {
				j = new java.util.Scanner(System.in).nextInt();
				if(0 <= j && j <= 10000) {
					if(j > a) {
						c = b;
						b = a;
						a = j;
					} else if(j > b) {
						c = b;
						b = j;
					} else if(j > c) {
						c = j;
					}
				} else {
					i--;
				}
		}
		System.out.println(a);
		System.out.println(b);
		System.out.println(c);
	}
}

C++: #include<iostream> 
#include<algorithm>
using namespace std;
void bubblesort(int A[]){
	for(int i=0;i<10;i++){
		for(int j=10-1;j>i;j--){
			if(A[j]>A[j-1]){
			int t=	A[j-1];
			A[j-1]=A[j];
			A[j]=t;
			}
		}
	}	
}
int main(){
	int A[10];
	int a; 
	for(int i=0;i<10;i++){
		
		cin>>a;
		if(a>0&&a<=10000)A[i]=a;
		
	}
	for(int i=0;i<3;i++)
	{
		bubblesort(A);
		if(i>0)cout<<endl;
		cout<<A[i];
	  } 
	 return 0;
}

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

using namespace std;

int main(void)
{
	int height[10];
	for (int& x : height) {
		cin >> x;
	}
	sort(&height[0], &height[10]);

	for (int i = 9; i >= 7; i--) {
		cout << height[i] << endl;
	}

	return 0;
}

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

void swap(int *x, int *y){
    int temp;

    temp = *x;
    *x = *y;
    *y = temp;
}

int main(){
    int hill[10];
    int i, j, max=0;
    int key;

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

    // insert sort
    for (i = 0; i < 10; i++) {
        j = i;
        while((j > 0) && hill[j-1] > hill[j]){
            swap(&hill[j-1], &hill[j]);
            j--;
        }
    }

    for (i = 9; i > 6; i--) {
        // printf("%d\n", hill[i]);
        cout << hill[i] << endl;
    }
    return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
    int i,h,a=0,b=0,c=0;
    for(i=0;i<10;i++){
    cin >> h;
    if(a<h){
        c=b;
        b=a;
        a=h;
    }else if(b<h){
        c=b;
        b=h;
    }else if(c<h){
        c=h;
        }
    }
    cout << a << endl << b << endl << c << endl;
return 0;
}

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

int main() {
  int i;
  int height[10];
  for(i = 0; i < 10; i++) {
    scanf("%d", height+i);
  }
  std::sort(height, height+10);

  printf("%d\n%d\n%d\n", height[9], height[8], height[7]);

  return 0;
}

C++: #include <iostream>

using std::cin;
using std::cout;
using std::endl;

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

    for (int i = 0; i < 10; ++i) {
        for (int j = 0; j < 10; ++j) {
            if (heights[i] > heights[j]) {
                heights[10] = heights[i];
                heights[i] = heights[j];
                heights[j] = heights[10];
            }
        }
    }

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

C++: #include<stdio.h>
int main(){
	int a[10],i,j,k,temp;
	for(i=0;i<10;i++){
		scanf("%d",&a[i]);
	}
	for(i=0;i<9;i++){
		for(j=i+1;j<10;j++){
			if(a[i]<a[j]){
				temp=a[j];
				a[j]=a[i];
				a[i]=temp;
			}
		}
	}
	for(i=0;i<3;i++){
		printf("%d\n",a[i]);
	}
	return 0;
}

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

int main(){
	int a,b,c,x;

	for(int i=0;i<=9;i++){
		cin >> x;

		if(x>a){
			c=b;
			b=a;
			a=x;
		}else if(x>b){
			c=b;
			b=x;
		}else if(x>c){
			c=x;
		}
	}

	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<<endl<<a[9]<<endl<<a[8]<<endl<<a[7]<<endl;
}

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

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

C++: #include <stdio.h> 
int main(){
    int x[10],y[10]={},i,j;
     for(i=0;i<10;i++){scanf("%d",&x[i]);}
     for(i=0;i<10;i++){
     for(j=0;j<10;j++){
         if(x[i]<x[j]) y[i]++;
}
}
for(i=0;i<10;i++){
if(y[i]==0) printf("%d\n",x[i]);
}
for(i=0;i<10;i++){
if(y[i]==1) printf("%d\n",x[i]);
}
for(i=0;i<10;i++){
if(y[i]==2) printf("%d\n",x[i]);
}
return 0;
}

C++: #include <cstdio>

#define swap(a,b) a^=b^=a^=b
int main(){
    int a=0,b=0,c=0,getin;
    for(int i=0;i<10;i++){
        scanf("%d",&getin);
        if(getin>c) c=getin;
        if(getin>b) swap(b,c);
        if(getin>a) swap(a,b);
    }
    printf("%d\n%d\n%d\n",a,b,c);
    return 0;
}

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

int main()
{
    vector<int> a(10);
    for (int i = 0; i < 10; i++)
    {
        scanf("%d", &a[i]);
    }
    sort(a.begin(), a.end(), greater<int>());
    for (int i = 0; i < 3; i++)
    {
        cout << a[i] << endl;
    }
}

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

int main(){
	int h[10];
	int i,j;
	int t;

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

	for(i=9;i>-1;i--){
		for(j=i-1;j>-1;j--){
			if(h[j]<h[i]){
				t=h[i];
				h[i]=h[j];
				h[j]=t;
			}
		}
	}

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

	return 0;

}