Go: package main

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

var maxint = 10000
var scanner = bufio.NewScanner(os.Stdin)

func nextInt() (int, error) {
	scanner.Scan()
	return strconv.Atoi(scanner.Text())
}

func main() {
	scanner.Split(bufio.ScanWords)
	arr := make([]int, 10)
	for i := range arr {
		n, _ := nextInt()
		arr[i] = n
	}

	sort.Slice(arr, func(i, j int) bool {
		return arr[i] >= arr[j]
	})

	arrStr := fmt.Sprintf("%+v", arr[0:3])
	arrStr = arrStr[1:(len(arrStr) - 1)]
	arrStr = strings.Replace(arrStr, " ", "\n", -1)
	fmt.Println(arrStr)
}

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);
     }
     for(int i=9;i>6;i--){
           cout<<a[i]<< endl;
     }
	
     return 0;
}

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

int main()
{
    int in;
    vector<int> v;
    while(cin >> in)
    {
        v.push_back(in);
    }
    sort(v.begin(), v.end(), greater<int>());
    for(int i = 0; i < 3 ; i++)
    {
        cout << v[i] << endl;
    }
}

C++: #include<iostream>
#include<queue>
using namespace std;
int main()
{
	int i;
	priority_queue<int>que;
	int a[10];
	for(i=0;i<10;i++)
		cin>>a[i];
	for(i=0;i<10;i++)
		que.push(a[i]);
	for(i=0;i<3;i++)
	{
		cout<<que.top()<<endl;
		que.pop();
	}
	return 0;
}

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

int main()
{
	int array[10];
	int i, j, tmp;
	
	for(i=0; i<10; i++){
		cin >> array[i];
	}
	
	for(i=0; i<9; i++){
		for(j=i+1; j<10; j++){
			if(array[i] < array[j]){
				tmp = array[i];
				array[i] = array[j];
				array[j] = tmp;
			}
		}
	}
	
	for(i=0; i<3; i++){
		cout << array[i] << "\n";
	}
	
	return 0;
}

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

int main()
{
    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 N,M,p,d[10000],x[4],r,l;
int main(){
for(int i=0;i<10;i++){
cin>>d[i];
}
sort(d,d+10);
for(int i=0;i<3;i++){
cout<<d[i]<<endl;}
return 0;
}

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

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

C++: #include<iostream>
#include<vector>
std::vector<int> qsort(std::vector<int> xs);

int main(){
	std::vector<int> vec(10);
	for(int i=0;i<10;i++){
		std::cin>>vec[i];
	}
	qsort(vec);
	std::cout<<vec[9]<<std::endl;
	std::cout<<vec[8]<<std::endl;
	std::cout<<vec[7]<<std::endl;
	return 0;
}

std::vector<int> qsort(std::vector<int> xs){
	if(xs.empty()){
		return xs;
	}else{
		int x=xs[0];
		std::vector<int> left;
		std::vector<int> right;
		for(int i=1;i<xs.size();i++){
			if(xs[i]>x){
				left.push_back(xs[i]);
			}
			if(xs[i]<=x){
				right.push_back(xs[i]);
			}
		}
		left=qsort(left);
		right=qsort(right);
		left.push_back(x);
		left.insert(left.end(),right.begin(),right.end());
		return left;
	}
}

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

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

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

void swap(int& a, int& b) {
	int x = a;
	a = b;
	b = x;
}

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

	for(int i = 0; i < 10; ++i) {
		int x;
		cin >> x;
		if(third <= x)		third = x;
		if(second <= third)	swap(second, third);
		if(first <= second)	swap(first, second);
	}
	printf("%d\n%d\n%d\n", first, second, third);

	return 0;
}

C++: #include<iostream>
int main()
{
	int h1 = -1, h2 = -1, h3 = -1;
	for(int i = 0; i < 10; i++)
	{
		int h;
		std::cin >> h;
		if(h > h1)
		{
			h3 = h2;
			h2 = h1;
			h1 = h;
		}
		else if(h > h2)
		{
			h3 = h2;
			h2 = h;
		}
		else if(h > h3)
		{
			h3 = h;
		}
	}
	std::cout << h1 << std::endl;
	std::cout << h2 << std::endl;
	std::cout << h3 << std::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 x=0;x<9;x++){
		for(int i=0;i<9;i++){
			if(a[i] > a[i+1]){
				swap(a[i],a[i+1]);
			}
		}
		
	}
	cout<<a[9]<<" "<<a[8]<<" "<<a[7]<<endl;
	return 0;
}

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

int main() {
    int height[11];
    int temp;
    for (int i = 0; i < 10; i++) {
        cin >> height[i];
    }
    for (int i = 0; i < sizeof(height - 2); i++) {
        for (int j = i+1; j < 10; j++) {
            if (height[i] < height[j]) {
                swap(height[i], height[j]);
            }
        }
    }
    for (int i = 0; i < 3; i++) {
        cout << height[i] << endl;
    }
}

C++: #include <stdio.h>
#include <iostream>
#include <math.h>
#include <string>
using namespace std;
int main(void)
{
	int m[10] = { 0 }, x;

	for (int i = 0; i < 10; i++) {
		cin >> m[i];
		for (int j = i; j > 0; j--) {
			if (m[j] > m[j - 1]) { x = m[j]; m[j] = m[j - 1]; m[j - 1] = x; }
		}
	}
	for (int i = 0; i < 3; i++) {
		printf("%d\n", m[i]);
	}
}

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

C++: #include<stdio.h>

int a,b,c,d,e,f,g,h,i,j,X;

 int main()
{
	scanf("%d %d %d %d %d %d %d %d %d %d",a,b,c,d,e,f,g,h,i,j);
		if(a>b)
		{
			X=a;
			a=b;
			b=X;
		}
	if(b>c)
	{	X=b;
		b=c;
		c=X; }
	if(c>d)
	{	X=c;
		c=d;
		d=X;}
	if(d>e)
	{	X=d;
		d=e;
		e=X;}
	if(e>f)
	{	X=e;
		e=f;
		f=X;}
	if(f>g)
	{	X=f;
		f=g;
		g=X;}
	if(g>h)
	{	X=g;
		g=h;
		h=X;}
	if(h>i)
	{	X=h;
		h=i;
		i=X;}
	if(i>j)
	{	X=i;
		i=j;
		j=X;  }
		if(a>b)
		{	X=a;
			a=b;
			b=X;}
	if(b>c)
	{	X=b;
		b=c;
		c=X;}
	if(c>d)
	{	X=c;
		c=d;
		d=X;}
	if(d>e)
	{	X=d;
		d=e;
		e=X;}
	if(e>f)
	{	X=e;
		e=f;
		f=X;}
	if(f>g)
	{	X=f;
		f=g;
		g=X;}
	if(g>h)
	{	X=g;
		g=h;
		h=X;}
	if(h>i)
	{	X=h;
		h=i;
		i=X;}
		if(a>b)
		{	X=a;
			a=b;
			b=X;}
	if(b>c)
	{	X=b;
		b=c;
		c=X;}
	if(c>d)
	{	X=c;
		c=d;
		d=X;}
	if(d>e)
	{	X=d;
		d=e;
		e=X;}
	if(e>f)
	{	X=e;
		e=f;
		f=X;}
	if(f>g)
	{	X=f;
		f=g;
		g=X;}
	if(g>h)
	{	X=g;
		g=h;
		h=X;}
		if(a>b)
		{	X=a;
			a=b;
			b=X;}
	if(b>c)
	{	X=b;
		b=c;
		c=X;}
	if(c>d)
	{	X=c;
		c=d;
		d=X;}
	if(d>e)
	{	X=d;
		d=e;
		e=X;}
	if(e>f)
	{	X=e;
		e=f;
		f=X;}
	if(f>g)
	{	X=f;
		f=g;
		g=X;}
		if(a>b)
		{	X=a;
			a=b;
			b=X;}
	if(b>c)
	{	X=b;
		b=c;
		c=X;}
	if(c>d)
	{	X=c;
		c=d;
		d=X;}
	if(d>e)
	{	X=d;
		d=e;
		e=X;}
	if(e>f)
	{	X=e;
		e=f;
		f=X;}
		if(a>b)
		{	X=a;
			a=b;
			b=X;}
	if(b>c)
	{	X=b;
		b=c;
		c=X;}
	if(c>d)
	{	X=c;
		c=d;
		d=X;}
	if(d>e)
	{	X=d;
		d=e;
		e=X;}
		if(a>b)
		{	X=a;
			a=b;
			b=X;}
	if(b>c)
	{	X=b;
		b=c;
		c=X;}
	if(c>d)
	{	X=c;
		c=d;
		d=X;}
		if(a>b)
		{	X=a;
			a=b;
			b=X;}
	if(b>c)
	{	X=b;
		b=c;
		c=X;}
			if(a>b)
		{	X=a;
			a=b;
			b=X;}
	printf("%d\n%d\n%d",j,i,h);

return 0;
}