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 <cstdio>
#include <algorithm>

using namespace std;

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

C++: #include <stdio.h>

#define MAX_NUM	(10)

static void 
sort(int h[])
{
	for (int i = 0; i < MAX_NUM; i++) {
		for (int j = MAX_NUM - 1; j > i; j--) {
			if (h[j] > h[j-1]) {
				int tmp = h[j];
				h[j] = h[j-1];
				h[j-1] = tmp;
			}
		}
	}
}

int
main(void)
{
	char line[80];
	int h[MAX_NUM] = { 0 };

 	for (int i = 0 ; i < 10; i++) {
		if (gets(line)) {
			if (sscanf(line, "%d", &(h[i])) != 1) {
				break;
			}
		}
 	}

	sort(h);
	
 	for (int i = 0 ; i < 3; i++) {
 		printf("%d\n", h[i]);
 	}

	return 0;
}

C++: #include <stdio.h>
#include <queue>
#include <vector>
using namespace std;

int main()
{
	priority_queue<int,vector<int>,less<int>> que;
	int in;

	for(int i = 0; i < 10; i++){
		scanf("%d",&in);
		que.push(in);
	}


	for(int j = 0; j < 3; j++){
		printf("%d\n",que.top());
		que.pop();
	}

	return 0;
}

C++: //include----------------------------------------------------------------------------------------------------------------------
#include <bits/stdc++.h>
 
//using namespace--------------------------------------------------------------------------------------------------------------
using namespace std;
 
//define-----------------------------------------------------------------------------------------------------------------------
#define rep(i, n) for(int i = 0; i < (int)n; i++)
#define FOR(i, s, n) for(int i = s; i < (int)n; i++)
#define per(i, n) for(int i = n; i >= 0; i--)
#define ROF(i, s, n) for(int i = s; i >= (int)n; i--)
#define FORIT(i, A) for (auto i : A)
#define PRINT(x) cout << (x) << "\n"
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define EACH(i, n) for (__typeof((n).begin()) i = (n).begin(); i != (n).end(); ++i)
#define SZ(a) int((a).size())
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define INF 1 << 25
#define CLR(a) memset((a), 0 ,sizeof(a))
#define dump(x) cerr << #x << " = " << (x) << "\n";
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << "\n";
#define sq(n) (n) * (n)
 
//typedef----------------------------------------------------------------------------------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
typedef unsigned int uint;
typedef unsigned long long ull;
 
//const------------------------------------------------------------------------------------------------------------------------
const double EPS = 1e-10;
const double PI = acos( -1.0 );
 
//global-----------------------------------------------------------------------------------------------------------------------
vector<int> a(10);
 
//function---------------------------------------------------------------------------------------------------------------------
int main() {
    rep( i, 10 ) {
        scanf( "%d", &a[ i ] );
    }
    sort( a.begin(), a.end() );
    ROF( i, 9, 7 ) {
        printf( "%d\n", a[ i ] );
    }
    return 0;
}

C++: #include <iostream>

void swap(int *a, int *b);

int main(void)
{
int b[3]={0,0,0};
int i=0;
for(; i < 10; i++){
int s;
scanf("%d",&s);
if(b[2] < s){b[2]=s;}
if(b[1] < b[2]){swap(&b[1],&b[2]);}
if(b[0] < b[1]){swap(&b[0],&b[1]);}
}
std::cout << b[0] << std::endl << b[1] << std::endl << b[2] << std::endl;
return 0;
}

void swap(int *a, int *b){
int c=*a;
*a=*b;*b=c;
return;
}

C++: #include <iostream>

int main()
{
    int i,high[10];
    for(i = 0;i < 10;++i){
        std::cin >> high[i];
    }
    manko::sort(high[0]);
    std::cout << high[0];
    std::cout << high[1];
    std::cout << high[2];
}

namespace manko{

void sort(int *a)
{
        int i,first = 0,secand = 0,third = 0;
        for(i = 0;i < 10;++i){
           if(first < *(a + i)){
               first = *(a + i);
           }else if(secand < *(a + i)){
               secand = *(a + i);
           }else if(third < *(a + i)){
               third = *(a + i);
           }
        }
        *a = first;
        *(a + 1) = secand;
        *(a + 2) = third;
}

}

C++: //
//  main.cpp
//  kyougi
//
//  Created by 寺林 一旭 on 2018/08/27.
//  Copyright © 2018年 寺林 一旭. All rights reserved.
//

#include <iostream>
#include <vector>
#include <algorithm>
#include <stdio.h>
using namespace std;
int main() {
    
    string num;
    vector<int> list;
    while(getline(cin, num))
    {
  
        int a,b;
        sscanf(num.c_str(), "%d %d",&a,&b);
        
        cout << a-b <<endl;
    }
   
    
    return 0;
}

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

int main(){

??????vector<int> data;

    for(int i=0;i<10;i++)
    {
       int input;
       cin>>input;
       data.push_back(input);
    }
    
    sort(data.begin,data.end,greater<int>());
    
    for(int i=0,i<3;i++)
    {
       cout<<data[i]<<endl;
    }

    return 0;
}

C++: #include <stdio.h>


int main(){
	int h[3]={0,0,0};
	int c,i;
	for(i=0;i<10;i++){
		scanf("%d",&c);
		if(c>h[0]){
			h[2]=h[1];
			h[1]=h[0];
			h[0]=c;
		}else if(c>h[1]){
			h[2]=h[1];
			h[1]=c;
		}else if(c>h[0]){
			h[2]=c;
		}
	}
	for(i=0;i<2;i++){
		printf("%d ",h[i]);
	}printf("%d\n",h[2]);
}

C++: #include <iostream>
#include <algorithm>
using namespace std;
void q_sort(int array[], int begin, int end);

void q_sort(int array[], int begin, int end){
    int i = begin;
    int k = end;
    int pivot;
    int temp;
    pivot = array[(begin + end) / 2];
    while (1) {
        while (array[i] < pivot) {
            ++i;
        }
        while (pivot < array[k]) {
            k--;
        }
        if (i >= k) {
            break;
        }
        temp = array[i];
        array[i] = array[k];
        array[k] = temp;
        i++;
        k++;
    }
    if (begin < i - 1) {
        q_sort(array, begin, i - 1);
    }
    if (k + 1 < end) {
        q_sort(array, k + 1, end);
    }
}
int main(int argc, const char * argv[])
{
    int mt[10];
    for (int i = 0; i < 10; i++) {
        cin >> mt[i];
    }
    q_sort(mt, 0, 10);
    for (int i = 9; 6 < i; i--) {
        cout << mt[i] << endl;
    }
    return 0;
}

C++: #include<bits/stdc++.h>

using namespace std;

int main(){
  int n;
  int mount[10]={};

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

  for(int i=9;i > 6;i--){
    
    cout << mount[i] << endl;
  }
  return 0;
}