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 <cstdio>
#include <iostream>

using namespace std;


signed main()
{   
    int mp[101] = {0};
    int key, j = 0;
    while ( scanf("%d\n", &key ) != EOF )
    {
        mp[ key ]++;
    }
    int mode = 0;
    for( int i = 1; i <= 100; i++ )
    {
        if( mode < mp[i] )
        {
            mode = mp[i];
        }
    }
    
    ///mode_value
    for( int i = 1; i <= 100; i++ )
    {
        if( mp[i] == mode )
        {
            cout << i + 1 << endl;
        }
    }
    return 0;
}

C++: #include <stdio.h>
#include <math.h>
#include <iostream>
 
using namespace std;
 
int main() {
 
    int counter[101] = {0};
    int a;
    int MAX = 0;
    int i = 0;
     
    while (cin >> a) {
        counter[a]++;
    }
 
    for (int j = 1; j < 101; j++) {
        MAX = max(MAX, counter[j]);
    }
 
    for (int k = 1; k < 101; k++) {
        if (MAX == counter[k]) {
            cout << k << endl;
        }
    }
 
    return 0;
}

C++: #include<bits/stdc++.h>
#define rep(i,n) for(int i=0; i<n; i++)
#define INF 1000000
using namespace std;
int main(){
    vector<int> vec(110,0);
    int n;
    while(cin >> n){
        vec[n]++;
        int tmp = 0;
        rep(i,vec.size()){
            tmp = max(tmp,vec[i]);
        }
        vector<int> ans;
        rep(i,vec.size()){
            if(tmp == vec[i]) ans.push_back(i);
        }
        sort(ans.begin(),ans.end());
        rep(i,ans.size()) cout << ans[i] << endl;
    }
    return 0;
}

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

int main(){
	int n;
	int all[100];
	for(int i=0; i<100; i++) all[i] = 0;
	while(cin>>n) all[n-1]++;
	int m = 0;
	for(int i=0; i<100; i++) m = max(m, all[i]);
	vector<int> ans;
	for(int i=0; i<100; i++){
		if(m==all[i]) ans.push_back(i+1);
	}
	for(int i=0; i<ans.size(); i++) cout<<ans[i]<<endl;
	return 0;
}

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

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

using namespace std;

int main (void) {
    int t[10] = {0}, m = 0;
    while (1) {
        int n;
        cin >> n;
        if (cin.eof()) break;
        t[n - 1]++;
        m = max(m, t[n - 1]);
    }
    for (int i = 0; i < 10; i++) {
        if (t[i] == m) {
            cout << (i + 1) << endl;
        }
    }
    return 0;
}

C++: #include<stdio.h>
#include<iostream>
using namespace std;
int main(void)
{
	int a[101]={0},i,n,s=0;
	while(cin>>n){
		a[n]++;
		if(a[n]>s){
			s=a[n];
		}
	}
	for(i=100;i>0;i--){
		if(s==a[i]){
		cout<<i<<endl;
		}
	}
	return 0;
}

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

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

int main(){
	int b[101],a[101],n;
	for(int i=0;i<101;i++){
		a[i] = 0;
		b[i] = a[i];
	}
	while(cin >> n && n){
		a[n] = a[n] + 1;
		b[n] = a[n];
	}
	sort(b,b+101);
	for(int i=1;i<101;i++){
		if(a[i] == b[100]) cout << i << endl;
	}
	return 0;
}

C++: #include <stdio.h>

struct freqency {
  
  int num;
  int freq;

}f[1000];

int main(void) {

  int n;

  int size=0;
  int max_freq=0;

  int mode[1000];
  int s=0;

  int i,j,temp;
  int flag;

  while(scanf("%d",&n)!=EOF) {
    //for(j=0;j<12;j++) {
    //scanf("%d",&n);
    flag=0;

    for(i=0;i<size;i++) {

      if(f[i].num==n) {
	flag=1;
	f[i].freq++;
      }

    }

    if(flag==0) {
	f[size].num=n;
	f[size].freq=1;
	size++;
    }

  }
  
  //for(j=0;j<10;j++) printf("%d %d\n",f[j].num,f[j].freq);

  for(i=0;i<size;i++) {

    if(max_freq<=f[i].freq) {
      max_freq=f[i].freq;
      mode[s]=f[i].num;
      s++;
    }

  }

  for(i=0;i<s;i++) {
    for(j=0;j<s-i-1;j++) {
      if(mode[j]>mode[j+1]) {
	temp=mode[j];
	mode[j]=mode[j+1];
	mode[j+1]=temp;
      }
    }
  }

  for(i=0;i<s;i++) {
    printf("%d\n",mode[i]);
  }

  

  return 0;

}

C++: #include <bits/stdc++.h>
using namespace std;
int main(){
  int n,a[101]={0},k=0;
  while(cin>>n){
    a[n]++;
    k=max(a[n],k);
  }
  for(int i=1;i<101;i++)if(a[i]==k)cout<<i<<endl;
}