Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func main() {
	result := make([]int, 6)
	scanner.Scan()
	n, _ := strconv.Atoi(scanner.Text())
	for i := 0; i < n; i++ {
		scanner.Scan()
		h, _ := strconv.ParseFloat(scanner.Text(), 64)
		if h < 165.0 {
			result[0]++
		} else if 165.0 <= h && h < 170.0 {
			result[1]++
		} else if 170.0 <= h && h < 175.0 {
			result[2]++
		} else if 175.0 <= h && h < 180.0 {
			result[3]++
		} else if 180.0 <= h && h < 185.0 {
			result[4]++
		} else if 185.0 <= h {
			result[5]++
		}
	}
	for i := 0; i < 6; i++ {
		fmt.Printf("%d:", i+1)
		for j := 0; j < result[i]; j++ {
			fmt.Print("*")
		}
		fmt.Println()
	}
}

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

int main(){
  int i;
  cin >> i;
  float data[40] = {}; 
  for(int j=0; j<i; ++j){
    cin >> data[j];
  }
  sort(data, data+i);
  int j=0;
  cout << "1:";
  while(data[j]<165 && data[j]!=0){
    cout << "*";
    ++j;
  }
  cout << endl << "2:";
  while(data[j]<170 && data[j]!=0){
    cout << "*";
    ++j;
  }
  cout << endl << "3:";
  while(data[j]<175 && data[j]!=0){
    cout << "*";
    ++j;
  }
  cout << endl << "4:";
  while(data[j]<180 && data[j]!=0){
    cout << "*";
    ++j;
  }
  cout << endl << "5:";
  while(data[j]<185 && data[j]!=0){
    cout << "*";
    ++j;
  }
  cout << endl << "6:";
  while(data[j]!=0){
    cout << "*";
    ++j;
  }
  cout << endl;
  return 0;
}

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

int main(void){
  int n;
  cin>>n;
  double h;
  int Dist[6]={0};
  for(int i=0;i<n;i++){
    cin>>h;
    if (h<165.0){
      Dist[0]+=1;
    }
    else if(h<170.0){
      Dist[1]+=1;
    }
    else if(h<175.0){
      Dist[2]+=1;
    }
    else if(h<180.0){
      Dist[3]+=1;
    }
    else if(h<185.0){
      Dist[4]+=1;
    }
    else{
      Dist[5]+=1;
    }
  }
  for(int i=0;i<6;i++){
    cout<<i+1<<":";
    for(int j=0;j<Dist[i];j++){
      cout<<"*";
    }
    cout<<endl;
  }
  return 0;
}

C++: #include <stdio.h>
int main() {
    int RB[6]={0,0,0,0,0,0},i,N,j,T[5]={1650,1700,1750,1800,1850};while (scanf("%d",&N)!=EOF) {
    while (N--) {scanf("%d.%d",&i,&j);i=i*10+j;if (i<T[0]) RB[0]++; else if (i>=T[4]) RB[5]++; else {for (j=1;j<5;j++) if (T[j-1]<=i && T[j]>i) RB[j]++;}}
    for (i=0;i<6;i++) {printf("%d:",i+1);while (RB[i]) RB[i]--,putchar('*');puts("");}} return 0;}

C++: #include<stdio.h>
int main(void)
{
	int a,s[7],i,j,d,f,g,h;
	scanf("%d",&a);
	for(i=1;i<=6;i++)	s[i]=0;
	for(i=1;i<=a;i++){
		scanf("%d.%d",&d,&f);
		if(d>=185)
			s[6]++;
		else if(d>=180)
			s[5]++;
		else if(d>=175)
			s[4]++;
		else if(d>=170)
			s[3]++;
		else if(d>=165)
			s[2]++;
		else if(d<165)
			s[1]++;
	}
	for(i=1;i<=6;i++){
		printf("%d:",i);
		for(j=1;j<=s[i];j++){
			printf("*");
		}
		printf("\n");
	}
	return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <complex>
#include <cstring>
#include <cstdlib>
using namespace std;

#define REP(i,n) for(int i=0;i<(int)n;++i)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define ALL(c) (c).begin(), (c).end()

int main() {
  int n;
  cin >> n;
  vector<double> v(n);
  while(n--) {
    cin >> v[n];
  }
  vector<int> ans(6);
  FOR(it,v) {
    if (*it<165)ans[0]++;
    REP(i,5)
      if (165+i*5<=*it && *it<170+i*5)
        ans[i+1]++;
  }
  REP(i,6) {
    cout << i+1 << ":";
    REP(j,ans[i])
      cout << '*';
    cout << endl;
  }
}

C++: #include <map>
#include <set>
#include <list>
#include <cmath>
#include <queue>
#include <stack>
#include <cstdio>
#include <string>
#include <vector>
#include <complex>
#include <cstdlib>
#include <cstring>
#include <numeric>
#include <sstream>
#include <iostream>
#include <algorithm>
#include <functional>

#define mp       make_pair
#define pb       push_back
#define all(x)   (x).begin(),(x).end()
#define rep(i,n) for(int i=0;i<(n);i++)
#define repi(i,a,b) for(int i = (a); i < (b); i++)

using namespace std;

typedef    long long          ll;
typedef    unsigned long long ull;
typedef    vector<bool>       vb;
typedef    vector<int>        vi;
typedef    vector<vb>         vvb;
typedef    vector<vi>         vvi;
typedef    pair<int,int>      pii;

const int INF=1<<29;
const double EPS=1e-9;

const int dx[]={1,0,-1,0},dy[]={0,-1,0,1};
double h[10]={165.0,170.0,175.0,180.0,185.0};
int main(){
	int n;
	double a;
	map<int,int> data;
	cin>>n;
	rep(i, n){
		cin>>a;
		if(a<h[0]){
			data[1]++;
		}else if(a >=h[0]&&a <h[1]){
			data[2]++;
		}else if(a >=h[1]&&a <h[2]){
			data[3]++;
		}else if(a >=h[2]&&a <h[3]){
			data[4]++;
		}else if(a >=h[3]&&a <h[4]){
			data[5]++;
		}else if(a>=h[4]){
			data[6]++;
		}
	}
	repi(i, 1, 7){
		cout <<i<<":";
		rep(j,data[i])cout <<"*";
		cout <<endl;
	}
	return 0;
}

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

using namespace std;

template <typename T>
T clamp(T x, T mini, T maxi) {
  return min(max(x, mini), maxi);
}

int main() {
  int n;
  scanf("%d", &n);

  int bucket[6] = {};
  for (int i = 0; i < n; i++) {
    int height;
    scanf("%d.%*d", &height);
    bucket[clamp((height - 160) / 5, 0, 5)]++;
  }
  for (int i = 0; i < 6; i++) {
    cout << i + 1 << ':' << string(bucket[i], '*') << '\n';
  }
  return 0;
}

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

using namespace std;

const double EPS = 1e-10;

int main()
{
    int n;
    cin >> n;

    int hist[6];
    fill(hist, hist+6, 0);
    double h;
    while(n--) {
        cin >> h;
        if(h < 165.0) {
            hist[0]++;
        } else if(h + EPS > 165.0 && h < 170.0) {
            hist[1]++;
        } else if(h + EPS > 170.0 && h < 175.0) {
            hist[2]++;
        } else if(h + EPS > 175.0 && h < 180.0) {
            hist[3]++;
        } else if(h + EPS > 180.0 && h < 185.0) {
            hist[4]++;
        } else {
            hist[5]++;
        }
    }
    
    for(int i = 0; i < 6; i++) {
        cout << (i+1) << ":";
        for(int j = 0; j < hist[i]; j++) cout << "*";
        cout << endl;
    }
}

C++: #include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
using namespace std;
#define all(c) (c).begin(),(c).end()
#define pb push_back
#define mp make_pair
#define ERASE(v,i) (v).erase(remove(all(v),i),(v).end())
#define rep(i,n) for(int i=0;i<(int)n;++i)
#define each(it,c) for(typeof((c).begin()) it=(c).begin();it!=(c).end();++it)
#define debug(x) cerr<<#x<<" = "<<(x)<<endl;
#define LINE cerr<<"LINE: "<<__LINE__<<endl;
inline int toInt(string s){int v;istringstream i(s);i>>v;return v;}
template<class T> inline string toString(T x){ostringstream o;o<<x;return o.str();}
template<class T> void pv(T a,T b){for(T it=a;it!=b;++it)cerr<<*it<<" ";cerr<<endl;}
const int INF = 1000000000;
const double PI = acos(-1.0), EPS = 1e-10;

int main() {
	int N; cin >> N;
	vector<int> ans(6, 0);
	while(N--) {
		double t; cin >> t;
		if(t < 165) ans[0]++;
		else if(t < 170) ans[1]++;
		else if(t < 175) ans[2]++;
		else if(t < 180) ans[3]++;
		else if(t < 185) ans[4]++;
		else ans[5]++;
	}
	for(int i = 1; i <= 6; i++) {
		cout << i << ":";
		for(int j = 0; j < ans[i - 1]; j++)
			cout << "*";
		cout << endl;
	}
	return 0;
}