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 <bits/stdc++.h>
using namespace std;

int main()
 {
   int a[100];
   for(int i=0;i<=9;i++)
    {
     cin>>a[i];
     }
    for(int j=0;j<=9;j++) {
     for(int k=0;k<=9;k++)
     {
         if(a[j]>a[k])
         {
             int t;
             t=a[j];
             a[j]=a[k];
             a[k]=t;
         }
     }
    }
     for(int g=0;g<=2;g++)
     {
         printf("%d\n",a[g]);
     }

 return 0;
 }

C++: #include<stdio.h>
int main(){
  int n,m[10000],i,sum;
  while(1){
    sum=0;
    scanf("%d",&n);
    if(n==0)break;
    for(i=0;i<n/4;i++){
      scanf("%d",&m[i]);
      sum+=m[i];
    }
    printf("%d\n",sum);
  }
  return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main()
{
    int height[10];
    for(int i=0;i<10;i++)
    {
        scanf("%d",&height[i]);
    }
    int temp;
    for(int i=0;i<10;i++){
            for(int j=i+1;j<=10;j++){
        if(height[i]<height[j]){
                temp=height[i];
            height[i]=height[j];
            height[j]=temp;
        }

            }

    }

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

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

static const int DataMax = 100;

static void input(std::vector<int>& hills)
{
    int val = 0;

    while (std::cin >> val) {
        hills.push_back(val);
    }
}

static int getMax(std::vector<int>& hills)
{
    std::sort(hills.begin(), hills.end());
    int ret = hills.back();
    hills.pop_back();

    return ret;
}

int main()
{
    std::vector<int> vec;

    input(vec);
    for (int i = 0; i < 3; i++) {
        std::cout << getMax(vec) << std::endl;
    }

    return 0;
}

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

int main(){
  int height[10];
  for(int i = 0; i < 10; i++)
    cin >> height[i];
  sort(height, height + 10);
  cout << height[9] << endl;
  cout << height[8] << endl;
  cout << height[7] << endl;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main(){
	int a;
	vector<int> v;
	for(int i=0;i<10;i++){
		cin>>a;
		v.push_back(a);
	}
	sort(v.begin(),v.end());
	cout<<v[9]<<endl;
	cout<<v[8]<<endl;
	cout<<v[7]<<endl;
	return 0;
}

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

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

#define SIZE 10

using namespace std;

int main(void) {
	vector<int> list;
	for (int i = 0; i < SIZE; i++) {
		int n;
		cin >> n;
		list.push_back(n);
	}
	sort(list.begin(), list.end());

	for (int i = 9; i >= 7; i--) {
		cout << list[i] << "\n";
	}
	int n;
	cin >> n;
	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);
	for(int i=0;i<3;i++){
		cout<<a[i]<<endl;
	}
	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
  int a;
  int x=0;
  int y=0;
  int z=0;
  for(int i=1;i<=10;i++){
    cin >> a;
    if(a>x){
      x=a;
    }else if(y<a<=x){
      y=a;
    }else if(z<a<=y){
      z=a;
    }
  }
  cout << x << endl;
  cout << y << endl;
  cout << z << endl;
}

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

using namespace std;
int x[10];
int main(){
for(int i=0;i<10;i++){
cin>>x[i];
}
sort(x,x+10);
cout<<x[9]<<endl;
cout<<x[8]<<endl;
cout<<x[7]<<endl;
return 0;
}

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

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

int main() {

	int yama[10];
	
	for(int i = 0; i <= 9; i++) {
	cin >> yama[i];
	}
	
	for(int i = 0; i <= 8; i++) {
		for(int j = i + 1; j <= 9; j++) {
			if(yama[i] < yama[j]){
				int x = yama[i];
				yama[i] = yama[j];
				yama[j] = x;
			}
		}
			
	}
	cout << yama[0] << endl << yama[1] << endl << yama[2] << 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>
#include <vector>
using namespace std;
int main(){
    vector<int> height;
    int h;
    while (cin>>h) {
        height.push_back(h);
    }
    sort(height.begin(), height.end());
    for(int i=1;i<=3;i++){
        cout<<height[height.size()-i]<<endl;
    }
    return 0;
}

C++: #include<iostream>
 using namespace std;
int main()
{
  int a,b,c,d,e,f,g,h,i,j,x,y,z;
  while(cin>>a,b,c,d,e,f,g,h,i,j)
  {
	  if(a>0)x=a;
	  if(b>a)x=b;
	  if(c>a)x=c;
	  if(d>a)x=d;
	  if(e>a)x=e;
	  if(f>a)x=f;
	  if(g>a)x=g;
	  if(h>a)x=h;
	  if(i>a)x=i;
	  if(j>a)x=j;
	   if(a>0&&a<x)y=a;
	  if(b>a&&b<x)y=b;
	  if(c>a&&c<x)y=c;
	  if(d>a&&d<x)y=d;
	  if(e>a&&e<x)y=e;
	  if(f>a&&f<x)y=f;
	  if(g>a&&g<x)y=g;
	  if(h>a&&h<x)y=h;
	  if(i>a&&i<x)y=i;
	  if(j>a&&j<x)y=j;
	   if(a>0&&a<x,y)z=a;
	  if(b>a&&b<x,y)z=b;
	  if(c>a&&c<x,y)z=c;
	  if(d>a&&d<x,y)z=d;
	  if(e>a&&e<x,y)z=e;
	  if(f>a&&f<x,y)z=f;
	  if(g>a&&g<x,y)z=g;
	  if(h>a&&h<x,y)z=h;
	  if(i>a&&i<x,y)z=i;
	  if(j>a&&j<x,y)z=j;
	  cout<<x<<endl;
	  cout<<y<<endl;
	  cout<<z<<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<3;i++){
		printf("%d\n",h[i]);
	}
}

C++: #include <cstdio>
#include <cstdlib>
#include <iostream>
#include <algorithm>
using namespace std;
int a[11];
int main()
{
	for(int i=1;i<=10;i++)cin>>a[i];
	sort(a+1,a+11);
	cout<<a[10]<<endl;
	cout<<a[9]<<endl;
	cout<<a[8]<<endl;
	return 0;
}

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

int main(){
    int x;
    int h[3];
    for(int a=0;a<10;a++){
        cin >> x;
        if(x>h[0]){
            h[2] = h[1];
            h[1] = h[0];
            h[0] = x;
        }else if(x>h[1]){
            h[2] = h[1];
            h[1] = x;
        }else if(x>h[2]){
            h[2] = x;
        }
    }
    cout << h[0] << "\n" << h[1] << "\n" << h[2] << "\n";
    return 0;
}

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

using namespace std;

int main() {
	const int len = 10;
	int arr[len];

	for (int i = 0; i < len; i++)
		cin >> arr[i];

	for (int i = 0; i < len; i++)
		for (int j = 0; j < len; j++)
			if (arr[i] < arr[j])
				swap(arr[i], arr[j]);

	cout << endl;

	for (int i = len - 1; len - 4 < i; i--)
		cout << arr[i] << endl;

	return 0;
}