Go: // 九九を出すだけ
package main
import (
	"fmt"
	"os"
	"bufio"
	"strconv"
	"sort"
)

var sc = bufio.NewScanner(os.Stdin)
var out = bufio.NewWriter(os.Stdout)

func main(){
	sc.Split(bufio.ScanWords)
	defer out.Flush()
	mountains := make([]int, 10)
	for i:=0; i<10; i++{
		mountains[i]=nextInt()
	}
	sort.Sort(sort.Reverse(sort.IntSlice(mountains)))
	for _, v := range mountains[:3]{
		fmt.Fprintln(out, v)
	}
}

func next() string{
	sc.Scan()
	return sc.Text()
}

func nextInt() int{
	a, _ := strconv.Atoi(next())
	return a
}

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;
}

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

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

  for(int i = 0; i < 3; i++){
    int *ans;
    ans = max_element(mt, mt+10);
    cout << *ans << endl;
    *(mt+(ans-mt)) = 0;
  }
}

C++: #include<iostream>
using namespace std;
int main(void){
	int T,t3,t2,t1;
	for(int i=0;i<10;i++){
		cin>>T;
		if(T>=t1){
			t1=T;
			t2=t1;
			t3=t2;
		}
		else if(T>=t2){
			t2=T;
			t3=t2;
		}
		else if(T>=t3){
			t3=T;
		}
	}
	cout<<t1<<endl<<t2<<endl<<t3;
	return 0;
}

C++: #include <stdio.h>

//１０個のデータを入力し、大きい順で３つのデータを取り出すプログラム

int main(void)
{
	int i, j;		//繰り返し変数
	int h[10];		//データ格納スペース
	int n = 0;			//一時変数
	int rank[3];	//順位付けしたデータを格納

	for (i = 0; i < 10; i++){
		scanf("%d", &h[i]);
	}
	for (j = 0; j < 3; j++){
		for (i = 0; i < 10; i++){
			if (h[n] < h[i]){
				n = i;
			}
		}
		rank[j] = h[n];
		h[n] = -1;
		n = 0;
	}

	printf("%d\n", rank[0]);
	printf("%d\n", rank[1]);
	printf("%d\n", rank[2]);

	return (0);
}

C++: #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <algorithm>
using namespace std;



int main()
{
	//freopen("in.txt","r",stdin);
	//freopen("out.txt","w",stdout);
	
	int i,a[10];
	for(i=0;i<10;i++)
		scanf(" %d",&a[i]);
	sort(a,a+10);
	printf("%d\n%d\n%d\n",a[9],a[8],a[7]);
	
	return 0;
}

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

using namespace std;

////Nayeem Shahriar Joy,Applied Physics &Electronic Engineering,University of Rajshahi.

int main()

{
   vector<int>l;
   int a;
   for(int i=0;i<10;i++)

   {
       cin>>a;
       l.push_back(a);
   }
   sort(l.begin(),l.end());
   cout<<l[9]<<endl;
   cout<<l[8]<<endl;
   cout<<l[7]<<endl;
   return 0;
}

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

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<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 <stdio.h>
#include <iostream>

using namespace std;

int main(){
	//変数宣言
	int height[10],	//高さの配列
		pos,		//最大値消去用
		max[3];		//最大値格納
	//入力
	for(int i=0;i<10;i++)
		cin >> height[i];

	//最大値を出す
	for(int i=0;i<3;i++){
		int tmp = 0;
		//最大値を出す & posに場所記録
		for(int n=0;n<10;n++){
			if(tmp<height[n]){
				tmp = height[n];
				pos = n;
			}
		}
			//最大値を記録
			max[i] = tmp;
			//最大値を消す
			height[pos] = 0;
	}

	//表示
	for(int i=0;i<3;i++)
		cout << max[i] << "\n";
	return 0;
}

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

int main(){

  vector<int> mt(10);

  for(int i=0;i<10;++i)
    cin>>mt[i];

  sort(mt.begin(),mt.end());

  for(int i=9;i>=7;--i)
    cout<<mt[i]<<endl;
  
}