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<vector>

using namespace std;

int main() {
  int a;
  vector<int> A(3);
  while(cin >> a) {
    if(A[0] < a) {
      if(A[1] < a) {
        if(A[2] < a) {
          swap(A[2],a);
        }
        swap(A[1], a);
      }
      swap(A[0], a);
    }
  }
  for(int i = 2; i >= 0; i--) {
    cout << A[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];
	}
	for(int i = 0; i < 3; i++){
		for(int j = 0; j < 9; j++ ){
			if(a[j] > a[j+1]){
				swap(a[j],a[j+1]);
			}
		}
		cout << a[9-i] << endl;
	}
	
	return 0; 
}

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

using namespace std;

int main(void)
{
	int input[10];

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


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

	sort(input, input+3, less<int>());

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


	return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
  vector<int> v;
  for (int i = 0; i < 10; i++) {
    int a;
    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;
}

C++: #include<iostream>

int main(){
		int Hills[10],i,j,n;

		for(i=0;i<10;i++){
			std::cin>>Hills[i];
			}
        for(i=0;i<9;i++){
			for(j=i+1;j<10;j++){
				if(Hills[i]<Hills[j]){
					n=Hills[i];
					Hills[i]=Hills[j];
					Hills[j]=n;
					}
				}
			}

		for(i=0;i<3;i++){
			std::cout<<Hills[i]<<std::endl;
			}
return 0;
}

C++: #include<stdio.h>
#include<algorithm>
#include<functional> 

using namespace std;
  
int main(){
  
 int i, height[10];
 for(i=0;i<10;i++){
  scanf("%d", &height[i]);
 }
 sort(height, height+10, greater<int>());
  
 for(i=0;i<2;i++){
  printf("%d\n", height[i]);
 }
  
 return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main() {
  vector<int> v;
  int h;
  while (cin >> h) {
    v.push_back(h);
  }
  sort(v.begin, v.end);
  int s = v.size();
  cout << v[s-1] << endl << v[s-2] << endl << v[s-3] << endl;
}

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

int A[11];

int main() {
    for (int i = 0; i < 10; i++) {
        scanf("%d", &A[i]);
    }
    for (int i = 0; i < 3; i++) {
        int max_val = A[i];
        for (int j = i+1; j < 10; j++) {
            if (max_val < A[j]) std::swap(max_val, A[j]);
        }
        A[i] = max_val;
    }
    for (int i = 0; i < 3; i++) {
        printf("%d\n", A[i]);
    }
    return 0;
}

C++: //
//  main.cpp
//  AOJ_V0_0001
//
//  Created by anzai on 2015/08/06.
//  Copyright (c) 2015??´ anzai. All rights reserved.
//

#include<iostream>
using namespace std;

int main(){
    
    int array[10] = {0};
    
    for (int i = 0; i < 10; i++) {
        cin >> array[i];
        
    }
    int first = 0;
    int second = 0;
    int third = 0;
    for (int i = 0; i < 9; i++) {
        if (first <= array[i]) {
            first = array[i];
            
        }
        else if ((second <= array[i]) && (second != first )){
            second = array[i];
            
        }
        else if ((third <= array[i]) && (third != second ) && (third != first)){
            third = array[i];
        }
    }
    cout << first << endl;
    cout << second << endl;
    cout << third << endl;
    
    return 0;
}

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

int cmp(const void *a, const void *b)
{
int*x = (int*)a;
int*y = (int*)b;
if(*x > *y)
return -1;
else if(*x < *y)
return 1;
else
return 0;
}

int main()
{
int i, ara[10];
for(i = 0; i < 10; i++)
scanf("%d", &ara[i]);

qsort(ara, 10, sizeof(int), &cmp);
for(i = 0; i < 3; i++)
printf("%d\n", ara[i]);
return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
  int a[10],temp;
  for(int i=0;i<10;i++){
    cin>>a[i];
  }
  for(int i=0;i<10;i++){
    for(int j=0;j<10-i-1;j++){
      if(a[j]<a[j+1]){
	temp=a[j];
	a[j]=a[j+1];
	a[j+1]=temp;
      }
    }  
  }
  for(int i=0;i<3;i++){
    cout<<a[i]<<endl;
  }
  return(0);
}

C++: #include<stdio.h>

int main(){
	int a1 = 0, a2 = 0, a3 = 0;

	int x;
	while(scanf("%d", &x)){
		if(x > a3){
			a3 = x;
		}
		if(x > a2){
			a3 = a2;
			a2 = x;
		}
		if(x > a1){
			a3 = a2;
			a2 = a1;
			a1 = x;
		}
	}

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

	return 0;
}

C++: #include<stdio.h>

int main(void){
	int i,j,k,x[10],highest,higher,high;
	for(i=0;i<10;i++){
		scanf("%d",&x[i]);
	}
	highest=0;
	higher=0;
	high=0;
	for(i=0;i<10;i++){
		if(x[i] >= highest){
		highest=x[i];
	}
	}
	for(j=0;j<10;j++){
		if(x[j]>=higher && highest > x[j]){
		higher=x[j];
	}
	}
	for(k=0;k<10;k++){
		if(x[k]>=high && highest > x[k] && higher > x[k]){
		high=x[k];
		}
	}
	printf("%d\n%d\n%d\n",highest,higher,high);
	
return 0;
}

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

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

int main()
{
    int in;
    int first = 0, second, third;

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

        if (first <= in) {
            third = second;
            second = first;
            first = in;
        } else if (second <= in) {
            third = second;
            second = in;
        } else if (third <= in) {
            third = in;
        }
    }

    cout << first << endl
         << second << endl
         << third << endl;

    return 0;
}

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

using namespace std;
int main() {
    vector<int> h;
    for(int i=0;i<10;i++){
        int tmp;
        cin >> tmp;
        h.push_back(tmp);
    }

    sort(begin(h),end(h));

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

}

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

using namespace std;

int main(void)
{
  int height;
  vector<int> mountain;

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

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

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

  return 0;

}

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

using namespace std;

int main()
{
  vector<int> height;
  int i = 0, n;
  while (scanf(" %d ", &n) == 1) {height.push_back(-n);}
  sort(height.begin(), height.end());
  for (i = 0; i < 3; i++) {
    printf("%d\n", -1 * height[i]);
  }
  return 0;
}

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

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

  sort(h, h+10, greater<int>());

  cout<<h[0]<<h[1]<<h[2];

  return 0;
}