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 <cstring>
#define rep(i,n) for(int i=0;i<n;i++)

using namespace std;

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

	int a[6];
	memset(a,0,sizeof(a));
	
	rep(i,n)
	{
		double t;
		cin >> t;

		if(t < 165.0) a[0]++;
		else if(t < 170.0) a[1]++;
		else if(t < 175.0) a[2]++;
		else if(t < 180.0) a[3]++;
		else if(t < 185.0) a[4]++;
		else a[5]++;
	}

	rep(i,6)
	{
		cout << i+1 << ":";
		rep(j,a[i])
		{
			cout << "*";
		}
		cout << endl;
	}
	return 0;
}

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

using namespace std;

int main()
{
	int n;
	vector<double> vTalls;

	cin >> n;
	if(n == 0)
		return 0;

	for(int i = 0; i < n; ++i)
	{
		double t;
		cin >> t;
		vTalls.push_back( t );
	}

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

	for(int i = 0, h = 1; i < n && h <= 6; ++h)
	{
		const double ranks[] = {0.0,165.0,170.0,175.0,180.0,185.0};
		cout<<h<<":";
		for(int j = i; j < n; ++j)
		{
			if( vTalls[j] < ranks[h] )
				cout<<"*";
			else
			{
				i = j;
				break;
			}
		}
		if( h == 6 )
		{
			for(int j = i; j < n; ++j)cout<<"*";
		}
		cout<<'\n';
	}
	return 0;
}

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

#define rep(i, n)for((i) = 0;(i) < (n);++(i))

string res[6] = {"1:", "2:", "3:", "4:", "5:", "6:"};

int main(void){
	int i, j, n;
	double h;
	scanf("%d", &n);
	for(;n--;){
		scanf("%lf", &h);
		rep(i, 5)if(h < 165.0 + (double)i * 5.0){
			res[i] += "*";
			break;
		}
		if(i == 5)res[5] += "*";
	}
	rep(i, 6)cout << res[i] << endl;
}

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

int main()
{
  int n;
  cin >> n;
  int m[6] = { 0, 0, 0, 0, 0, 0, };

  for (int i=0; i<n; i++)
  {
    double height;
    cin >> height;
    if ( height < 165.0 )
    {
      m[0]++;
    }
    else if ( height < 170.0 )
    {
      m[1]++;
    }
    else if ( height < 175.0 )
    {
      m[2]++;
    }
    else if ( height < 180.0 )
    {
      m[3]++;
    }
    else if ( height < 185.0 )
    {
      m[4]++;
    }
    else
    {
      m[5]++;
    }
  }

  for (int i=0; i<6; i++)
  {
    cout << i+1 << ':' << flush;
    for (int j=0; j<m[i]; j++)
    {
      cout << '*' << flush;
    }
    cout << endl;
  }
}

C++: #include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <sstream>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <numeric>
#include <cmath>
#include <climits>
#include <limits>
#include <cfloat>
#include <fstream>
using namespace std;

int main()
{
	const double hight[] = { 0.0, 165.0, 170.0, 175.0, 180.0, 185.0, DBL_MAX };
//	cut here before submit 
//	freopen("testcase.hist", "r", stdin);
	string str = "";
	int n;

	getline (cin, str );
	stringstream ssn(str);
	ssn >> n;

	vector <int> hist (sizeof(hight)/sizeof(hight[0]) - 1, 0);
	int i,j;

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

		getline (cin, str );
		double h;

		stringstream ss(str);
		ss >> h;

		for (j = 0; j < hist.size(); ++j){
			if (h >= hight[j] && h < hight[j+1] ){
				++hist[j];		
			} // end if
		} // end for

	} // end loop

	for (i = 0; i < hist.size(); ++i){
		cout << (i+1) << ':';
		for (j = 0; j < hist[i]; ++j){
			cout << '*';
		} // end for
		cout << endl;
	} // end for
		
	return 0;
}

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

using namespace std;

int main(void){
	int n;
	double stu[64];
	double shi[8]={0.0,165.0,170.0,175.0,180.0,185.0,2000000000.0};
	scanf("%d", &n);
	for(int i = 0; i < n; i++){
		scanf("%lf", &stu[i]);
	}
	
	sort(stu,stu+n);
	for(int i = 0; i < n; i++){
		printf("%lf\n",stu[i]);
	}
	for(int i = 0; i < 6; i++){
		printf("%d:",i+1);
		for(int j = 0; j < n; j++){
			if(shi[i+1]>stu[j]&&shi[i]<=stu[j]){
				printf("*");
			}
		}puts("");
	}
	
	return 0;
}

C++: #include "bits/stdc++.h"

#define REP(i,num) for(int i=0;i<(num);++i)
#define LOOP(i) while(i--)
#define ALL(c) c.begin(),c.end()
#define PRINTALL(c) for(auto& x:c){cout<<x<<' ';}cout<<endl;
#define PAIRCOMP(c,comp) [](const pair<ll,ll>& lhs,const pair<ll,ll>& rhs){return lhs.c comp rhs.c;}

using namespace std;
using ll = long long;

constexpr ll atcoder_mod = 1e9+7;

template<typename T=int>
T in(){T x; cin >> x; return (x);}
template<typename T=int,typename C=vector<T>>
C vecin(int N){C x(N);REP(i,N){x[i]=in<T>();}return move(x);}

void vout(){cout << endl;}
template<typename Head,typename... Tail>
void vout(Head&& h,Tail&&... t){cout << ' ' << h;vout(forward<Tail>(t)...);}
void out(){cout << endl;}
template<typename Head,typename... Tail>
void out(Head&& h,Tail&&... t){cout << h;vout(forward<Tail>(t)...);}

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	cout<<fixed<<setprecision(10);

	int N=in();
	vector<int> H(6,0);
	REP(i,N){
		int V = in<double>();
		if(V<165) H[0]++;
		else if(V<170) H[1]++;
		else if(V<175) H[2]++;
		else if(V<180) H[3]++;
		else if(V<185) H[4]++;
		else H[5]++;
	}
	
	REP(i,6){
		cout<< i+1 << ':';
		REP(j,H[i]) cout << '*';
		out();
	}
	return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;

int main(void) {
    int n, cnt[6] = {};
    double h;
    cin >> n;
    for (int i = 0; i < n; i++) {
        cin >> h;
        if (h < 165.0) cnt[0]++;
        else if (h < 170.0) cnt[1]++;
        else if (h < 175.0) cnt[2]++;
        else if (h < 180.0) cnt[3]++;
        else if (h < 185.0) cnt[4]++;
        else cnt[5]++;
    }

    for (int i = 0; i < 6; i++) {
        cout << i + 1 << ":";
        for (int j = 0; j < cnt[i]; j++)
            cout << "*";
        cout << endl;
    }
    
    return 0;
}

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

int main(){
  double st[40];
  int level[6]={},n;

  cin>>n;
  for(int i=0;i<n;i++){
    cin>>st[i];
    if(st[i]<165){
      level[0]++;
    }else if(st[i]<170){
      level[1]++;
    }else if(st[i]<175){
      level[2]++;
    }else if(st[i]<180){
      level[3]++;
    }else if(st[i]<185){
      level[4]++;
    }else{
      level[5]++;
    }
  }

  for(int i=0;i<6;i++){
    cout << i+1 << ":";
    for(int j=0;j<level[i];j++){
      cout << "*";
    }
    cout << endl;
  }

}

C++: #include<bits/stdc++.h>
using namespace std;
int dd(double a){
  if(a<165)return 0;
  if(a<170)return 1;
  if(a<175)return 2;
  if(a<180)return 3;
  if(a<185)return 4;
  return 5;
}
int main(){
  int n,d[6]={};
  cin>>n;
  double h;
  for(int i=0;i<n;i++)
    cin>>h,d[dd(h)]++;
  for(int i=0;i<6;i++){
    cout<<i+1<<':';
    for(int j=0;j<d[i];j++)cout<<'*';
    cout<<endl;
  }
  return 0;
}