Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func nextInt() int {
	scanner.Scan()
	i, e := strconv.Atoi(scanner.Text())
	if e != nil {
		panic(e)
	}
	return i
}
func main() {
	heighs := make([]int, 10)
	for i := range heighs {
		heighs[i] = nextInt()
	}
	sort.Sort(sort.Reverse(sort.IntSlice(heighs)))
	for i := 0; i < 3; i++ {
		fmt.Println(heighs[i])
	}
}

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

int main(){
 int mountain,first=0,second=0,third=0;
 for(int i=0;i<10;i++){
  cin>>mountain;
  if(mountain>first){
   third=second;
   second=first;
   first=mountain;
  }else if(mountain>second){
   third=second;
   second=mountain;
  }else if(mountain>third){
   third=mountain;
  }
 }
 cout<<first<<'\n'<<second<<'\n'<<third<<'\n';
 return 0;
}

C++: 
#include <iostream>

using namespace std;

void reverse(int *array, int length) {
	int i;
	int j;
	for(i=0;i<length-1;i++){
		for(j=i+1;j<length;j++){
			if(array[i]<array[j]){
				int temp=array[i];
				array[i]=array[j];
				array[j]=temp;
			}
		}
	}
}

int main() {
	int mountain[10];
	for (int i = 0; i < 10; i++) {
		cin >> mountain[i];
	}
	reverse(mountain, 10);
	for (int i = 0; i < 3; i++) {
		cout << mountain[i] << endl;
	}
}

C++: #include <iostream>
 using namespace std;
 int main()
 {
 int i=0; int num[10];
 for(;i<10;i++)
 cin>>num[i];
 int temp=0,temp1=0,j=0,k=0;
  for(;j<3;j++) {
  for(i=0;i<10;i++)
   { temp1=temp; temp=temp<num[i]?num[i]:temp; if(temp>temp1) k=i; }
    cout<<num[k]<<endl; temp=0; num[k]=0; }
     return 0;
      }

C++: #include <iostream>

int main(int argc, const char * argv[])
{
    using namespace std;
        int max = 0;
        int second = 0;
        int third = 0;
    
    int n[10];
    
    for(int i = 0; i < 10; i++) cin >> n[i];
    sort(n,n+10,greater<int>());
    max = n[0];
    second = n[1];
    third  = n[2];
    cout << max << "\n" << second << "\n" << third << "\n";
    return 0;
}

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

int main()
{
    int a[10] , i = 0;
	
    while (i < 10){
		cin>>a[i];
		i++;
    }
	
    sort(a , a + 10);
	
	while (--i > 6){
		cout << a[i] << endl;
	}
	
	return 0;
}

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

int main(int argc, char *argv[]){
  int n;
  vector<int> a;
  while(cin >> n){
    a.push_back(-n);
  }
  sort(a.begin(), a.end());
  std::cout << -a[0] << std::endl;
  std::cout << -a[1] << std::endl;
  std::cout << -a[2] << std::endl;
  return 0;
}

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

int heights[10];

int main(){
for(auto i:heights){
cin>>i;
}

sort(&heights[0],&heights[9]+1);

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

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,greater<int>());
    for(int i=0;i<3;i++)
        cout << a[i] << endl;
    return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <stack>
#include <cstdio>
using namespace std;
// int a[10];
// bool ans;
// void dfs(int i,int r,int l){
// 	if(i==10)ans=1;
// 	if(ans)return;
// 	if(a[i]<r&&a[i]<l)return;
// 	if(r<a[i])dfs(i+1,a[i],l);
// 	if(l<a[i])dfs(i+1,r,a[i]);

// }
// int main(){
// 	int t;
// 	cin>>t;
// 	while(t--){
// 		ans=0;
// 		for(int i=0;i<10;i++)cin>>a[i];
// 		dfs(0,0,0);
// 		if(ans)cout<<"YES"<<endl;
// 		else cout<<"NO"<<endl;
// 	}
// }

int main(){
	int a[10];
	for(int i=0;i<10;i++)cin>>a[i];
	sort(a,a+10);
	for(int i=0;i<2;i++)cout<<a[i]<<endl;
	return 0;
}

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

int main()
{
    int* h = new int[10];

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

    int max1=h[1], max2=h[2], max3=h[3];
    for(int j=0; j<9; j++){
        if(max1 <= h[j+1]){
            max1 = h[j+1]; 
        }
    }
    for(int j=0; j<9; j++){
        if(max2 <= h[j+1] && h[j+1] != max1){
            max2 = h[j+1]; 
        }
    }
    for(int j=0; j<9; j++){
        if(max3 <= h[j+1] && h[j+1] != max1 && h[j+1] != max2){
            max3 = h[j+1]; 
        }
    }

    cout << max1 << endl;
    cout << max2 << endl;
    cout << max3 << endl;
}

C++: #include <iostream>
#include <queue>
#include <vector>
#include <stack>



int main()
{
    int a, b, c;
    std::priority_queue<int, std::vector<int>, std::greater<int>> pq;
    int height, third;
    for (int i = 0; i < 10; i++) {
        //scanf("%d", &height);
        std::cin >> height;
        if (i < 3) {
            pq.push(height);
        } else {
            third = pq.top(); pq.pop();
            if (third < height) pq.push(height);
            else pq.push(third);
        }
    }

    c = pq.top(); pq.pop();
    b = pq.top(); pq.pop();
    a = pq.top(); pq.pop();

    std::cout << a << std::endl;
    std::cout << b << std::endl;
    std::cout << c << std::endl;

    return 0;
}

C++: #include<iostream>
using namespace std;
int main(){

    int m[10], temp;
    for(int i = 0; i < 10; i++)
        cin >> m[i];

    for(int i = 0; i < 4; i++){
        for(int j = i + 1; j < 10; j++){
            if(m[i] < m[j]){
                temp = m[i];
                m[i] = m[j];
                m[j] = temp;
            }
        }
    cout << m[i] << endl;
    }
}

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

using namespace std;

int main(){
	int a[10],i=0;
	for(;i<10;i++)scanf("%d",&a[i]);
	sort(a,a+10);
	for(i=0;i<3;i++)printf("%d\n",a[i]);
	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
	int t1,t2,t3,T;
	for(int i;i<10;i++){
		cin>>T;
		if(T>=t1){
			t3=t2;
			t2=t1;
			t1=T;
		}
		else if(T>=t2){
			t3=t2;
			t2=T;
		}
		else if(T>=t3){
			t3=T;
		}
	}
	cout<<t1<<endl<<t2<<endl<<t3<<endl;
	return 0;
}

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

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

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

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

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

int main(){
	int h = 0,m = 0,l = 0,tmp,i;

	for(i = 0;i < 9;i++){
		cin>>tmp;
		if(tmp > h){
			l = m;
			m = h;
			h = tmp;
		}else if(tmp > m){
			l = m;
			m = tmp;
		}else if(tmp > l){
			l = tmp;
		}
	}
	cout<<h<<endl;
	cout<<m<<endl;
	cout<<l<<endl;
	return 0;
}

C++: #include<cstdio>
#include<iostream>
using namespace std;
int a[11];
int main()
{
	int i,max1=-1,max2=-1,max3=-1;
	for(i=1;i<=10;i++)
	{
		cin>>a[i];
		if(a[i]>max1){max3=max2;max2=max1;max1=a[i];}
		else if(a[i]>max2){max3=max2;max2=a[i];}
		else if(a[i]>max3)max3=a[i];
	}
	cout<<max1<<endl<<max2<<endl<<max3;
	return 0;
}

C++: #include<stdio.h>
int main (void){
	int x1=0,x2=0,x3=0,input,s;
	for(s=0;s<10;s++){
		scanf("%d\n",&input);
		if(x1 < input){
			x3 = x2;
			x2 = x1;
			x1 = input;
		}else{
			if(x2 < input){
				x3 = x2;
				x2 = input;
			}else{
				if(x3 < input){
					x3 = input;
				}
			}
		}
	}
	printf("%d\n%d\n%d\n",x1,x2,x3);
	return(0);
}

C++: #include "stdio.h"

int main(){
  int height[10];
  for(int i = 0; i < 10; i++){
    scanf(" %d", &height[i]);
  }
  for(int numb = 0; numb < 9; numb++){
        for(int num = 0; num < 9-numb; num++){
            if(height[num] < height[num+1]){
                int stock = height[num];
                height[num] = height[num+1];
                height[num+1] = stock;
            }
        }
    }
  for(int a = 0; a < 3; a++){
    printf("%d\n", height[a]); 
  }
  return 0;
}