Go: package main

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

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	table := make([]int, 100)
	now := 0
	max := 0
	for i := range table {
		table[i] = 0
	}
	for scanner.Scan() {
		now, _ =strconv.Atoi(scanner.Text())
		table[now-1]++
		if table[now-1] > max {
			max = table[now-1]
		}
	}
	for i := 0; i < 100; i++ {
		if table[i] == max {
			fmt.Println(i+1)
		}
	}
}

C++: #include <iostream>
using namespace std;
int main(){
    int a[100];
    for(int i=0;i<100;i++)
        a[i]=0;
    int x;
    while(cin >> x){
        a[x-1]+=1;
    }
    int max=0;
    for(int i=0;i<100;i++){
        if(max<a[i])
            max=a[i];
    }
    for(int i=0;i<100;i++){
        if(max==a[i])
            cout << i+1 << endl;
    }

}

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

int main() {
  int n;
  vector<int> a_list;
  map<int, int> a;
  while (cin >> n) {
    a[n]++;
    a_list.push_back(n);
  }
  sort(a_list.begin(), a_list.end());
  a_list.erase(unique(a_list.begin(), a_list.end()), a_list.end());
  int max_n = 0;
  int i;
  for (i = 0; i < a_list.size(); i++) {
    max_n = max(max_n, a[a_list[i]]);
  }
  for (i = 0; i < a_list.size(); i++) {
    if (a[a_list[i]] == max_n) {
      cout << a_list[i] << endl;
    }
  }
  return 0;
}

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

int main(){

  int a[101];
  int n,M;

  for(int i = 1; i <= 100;i++ )a[i] = 0;
  M = 0;
  while(~scanf("%d",&n)){
    a[n]++;
    M=max(M,a[n]);
    cout << M << endl;
  }
  for(int i = 1;i <= 100 ; i++ ){
    if(a[i] == M)cout << i << endl;
}
  return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
	int a[105] = {},b,c=0;
	while(cin>>b){
		a[b]++;
	}
	for (int i = 0; i < 101; i++){
		if (c < a[i]){
			c = a[i];
		}
	}
	for (int i = 0; i < 101; i++){
		if (a[i] == c)cout << i << endl;
	}
	return 0;
}

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

int main() {
  vector<int> arr(MAX,0);
  int num;
  while(cin >> num) {
    arr[num]++;
  }
  int mode_max = 0;
  for(int i=0;i<MAX;i++) {
    mode_max = max(mode_max,arr[i]);
  }
  for(int i=0;i<MAX;i++) {
    if(arr[i] == mode_max) {
      cout << i << endl;
    }
  }
}

C++: #include <bits/stdc++.h>
using namespace std;
int main()
{
    int i,j,ara[1000],n=0,ara2[1000],k=0,c=1,max=0,mode,m;

    while (scanf ("%d",&m)!=EOF)
    {
        ara[n]=m;
        n++;
    }
    for (i=0;i<n-1;i++)
    {
        mode=0;
        for (j=i+1;j<n;j++)
        {
            if (ara[i]==ara[j])
            {
                mode++;
            }
        }
        if ((mode>max) && (mode!=0))
        {
            k=0;
            max=mode;
            ara2[k]=ara[i];
            k++;
        }
        else if (mode==max)
        {
            ara2[k]=ara[i];
            k++;
        }
    }
        sort(ara2,ara2+k);
        for (i=0;i<k;i++)
        {
            printf("%d\n",ara2[i]);
        }
        return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstdlib>
#include<vector>
#include<string>
#include<sstream>
#include<cmath>
#include<numeric>
using namespace std;

int main(){

  vector<int> a(101);
  int tmp;
  while(cin >> tmp){
    a[tmp]++;
  }
  int ans = *max_element(a.begin(), a.end());
  for(int i=0; i<101; i++){
    if( a[i] == ans ) cout << i << endl;
  }

  return 0;
}