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>
using namespace std;

int main(){

int a[10];


for(int k=0;k<10;k++){
cin>>a[k]>>endl;
}

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



for(int k=0;k<10;k++){
cout<<a[0] <<a[1] <<a[2]<<endl;
}



return 0;
}

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[i] >= a){ c = b, b = a, a = A[i]; }
		else if(A[i] >= b){ c = b, b = A[i]; }
		else if(A[i] >= c){ c = A[i]; }
    }
    cout << a << endl;
    cout << b << endl;
    cout << c << endl;
    return 0;
}

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

int main(){
     int a[10],i,judge;
     for(i=0;i<10;i++) cin >> a[i];
     judge = 0;
     do{
       judge = 1;
       for(i=0;i<10;i++){
         if(a[i]<a[i+1]){
           swap(a[i],a[i+1]);
           judge = 0;
         }
       }
     }while(!judge);

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

   return 0;
}

C++: #include <stdio.h>

int height[10];

int main(){
  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;
                printf("processing:%d\n", num);
            }
            printf("array[%d]:%d\n, array[%d]:%d\n",num,height[num], num+1, height[num+1]);
        }
    }
  for(int a = 0; a < 3; a++){
    printf("Height%d: %d\n", a, height[a]); 
  }
  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
 
int main(){
	ios::sync_with_stdio(false),cin.tie(0),cout.tie(0);
	int a[11];
	for(int i=0;i<10;i++){
		cin>>a[i];
	}
	sort(a,a+10);
	cout<<a[9]<<endl<<a[8]<<endl<<a[7];
    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)<<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);
	cout << a[9] << endl << a[8] << endl << a[7] << endl;
	
	return 0;
}

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

int main(){
	int m,max=0,cen=-1,min=-2;
	cin >> m;
	max=m;
	cen=m;
	min=m;
	for(int i=1;i<10;i++){
		cin >> m;
		if(max<m){
			min=cen;
			cen=max;
			max=m;
		}
		else if(cen<=m){
			min=cen;
			cen=m;
		}
		else if(min<=m) min=m;
	}
	cout << max << endl;
	cout << cen << endl;
	cout << min << endl;

		return 0;
}

C++: #include<stdio.h>
int main(void){
        int point[20],count=0,putCount=0,Ans=0,PMAX,i,Delete;
        point[0]=0;
        printf("--入力--\n");
        while(count<=9){
                scanf(" %d",&point[count]);
                count++;
                }
        count--;
        PMAX=count;
        printf("\n--出力--\n");
        while(count>0){
                for(i=0; i<=PMAX; i++){
                        if(point[i]>=Ans){
                                Ans=point[i];
                                Delete=i;
                                }
                        }
                point[Delete]=0;
                if(putCount<3){
                printf("        %d\n",Ans);
                putCount++;
                }
                Ans=0;
                count--;
                }
        return 0;
}

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

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

using namespace std;

int main(void) {
	int mh[10];
	string str;

	for (int i = 0; i < 10; i++) {
		getline(cin, str);
		mh[i] = atoi(str.c_str());
	}

	int s = sizeof(mh) / sizeof(int) - 1;
	sort(&mh[0], &mh[s]);

	for (int j = s; j > s - 3; j--) {
		cout << mh[j] << endl;
	}

	return 0;
}

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

using namespace std;


int main()
{
    int tmp;
    vector<int> num;
    
    for (int i = 0; i < 10; i++)
    {
        cin >> tmp;
        num.push_back(tmp);
    }
    
    sort(num.begin(), num.begin() + 10);
    for (int i = 9; i >= 7; i--)
    {
        cout << num[i] << endl;
    }
    
    return 0;
}

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


using namespace std;

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

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

int Size = 10;

int main(void) {
    int height[Size];
    
    for(int i = 0; i < Size; ++i) {
        cin >> height[i];
    }
    sort(height, height + Size);
    for(int i = 1; i <= 3; ++i) {
        cout << height[Size - i] << endl;
    }
}

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

int main() {
	int height;
	int top[3]={0,0,0};
	for(int i=0; i<10; i++){
		cin >> height;
		
		for(int j=0; j<3; j++){
			if(top[j]<=height){
				for(int k=2; k>j; k--){
					top[k]=top[k-1];
				}
				top[j]=height;
				break;
			}
		}
		
	}
	
	for(int i=0; i<3; i++){cout << top[i] << endl;}
	return 0;
}

C++: # include <iostream>
using namespace std;
void main(){
	for(int i =1;i<=9;i++){
		for(int j=1;j<=9;j++){
			cout <<i<<"x"<<j<<"="<<i*j<<"\n";
		}
	}
}

C++: //
//  main.cpp
//  ListOfHeights
//
//  Created by James Hosken on 28/09/2014.
//  Copyright (c) 2014 James Hosken. All rights reserved.
//

#include <iostream>
#include <stdlib.h>
#include <algorithm>
using namespace std;

int main(int argc, const char * argv[])
{
    
    string input_line;
    
    int *heights;
    heights = new int[0];
    int lineNum = 0;
    
    
    while(cin){
        getline(cin, input_line);
        lineNum++;
        
        //Chunk of array expansion code
        int line = atoi(input_line.c_str());
        int* temp = new int[lineNum];
        copy(heights, heights + lineNum-1, temp);
        delete [] heights;
        temp[lineNum-1] = line;
        heights = temp;
        
        
    }
    sort(heights, heights + lineNum);
    
    for(int i = 0; i < lineNum; i++){
        cout << heights[i] << " & I = " << i << endl;
    }

    
    
    
    return 0;
}