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 <bits/stdc++.h>
using namespace std ;

#define pb(n) push_back(n)
#define fi first
#define se second
#define all(r) (r).begin(),(r).end()
#define gsort(st,en) sort((st),(en),greater<int>())
#define vmax(ary) *max_element(all(ary))
#define vmin(ary) *min_element(all(ary))
#define debug(x) cout<<#x<<": "<<x<<endl
#define fcout(n) cout<<fixed<<setprecision((n))
#define scout(n) cout<<setw(n)
#define vary(type,name,size,init) vector< type> name(size,init)

#define rep(i,n) for(int i = 0; i < (int)(n);++i)
#define REP(i,a,b) for(int i = (a);i < (int)(b);++i)
#define repi(it,array) for(auto it = array.begin(),end = array.end(); it != end;++it)
#define repa(n,array) for(auto &n :(array))

using ll = long long;
using vi = vector<int>;
using vl = vector<ll>;
using dict = map<string,int>;
using pii = pair<int,int> ;

constexpr int imax = ((1<<30)-1)*2+1 ;
constexpr int inf = 100000000;
constexpr double PI = acos(-1.0) ;
double eps = 1e-10 ;
const int dy[] = {-1,0,1,0};
const int dx[] = {0,-1,0,1};

inline bool value(int x,int y,int w,int h){
  return (x >= 0 && x < w && y >= 0 && y < h);
}

template<typename T>
void Unique(vector<T> &v){
  sort(all(v));
  v.erase(unique(all(v)),v.end());
}

template<typename T>
T ston(string& str, T n){
  istringstream sin(str) ;
  T num ;
  sin >> num ;
  return num ;
}

void Ans(bool f){
  if(f) cout << "YES"<<endl;
  else cout << "NO"<<endl;
}

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  vary(int,v,6,0);
  rep(i,n){
    double h;
    cin >> h;
    rep(i,6){
      if(h < i*5 + 165.0){
        ++v[i];
        break;
      }
    }
  }
  rep(i,6){
    cout << to_string(i+1)+":";
    rep(j,v[i]){
      cout << "*";
    }
    cout << endl;
  }
  return 0;
}

C++: #include<iostream>
using namespace std;main(){int r[6],n,l,k;char c;for(cin>>n;n;n--){cin>>l>>c>>k;r[l>185?l=5:(l<165?l=0:l/5-32)]++;}for(k=0;k<6;k++){for(cout<<k+1<<":";r[k];r[k]--)cout<<"*";cout<<endl;}}

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

int main()
{
	int n;
	int freq[ 7 ];

	while( cin >> n ){
		memset( freq, 0, sizeof(freq) );
		for( int i = 0; i < n; ++i ){
			double height;
			cin >> height;
			int f = static_cast<int>( height - 155 ) / 5;
			if( f < 1 ){
				f = 1;
			}else if( f > 6 ){
				f = 6;
			}
			freq[ f ]++;
		}

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

	return 0;
}

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

using namespace std;

int main(){

  int n;

  cin >> n;

  vector<double> h(n);
  vector<int> num(6);
  
  for(int i=0;i<n;++i){
	cin >> h[i];

	if(h[i] < 165.0)
	  num[0]++;
	else if(h[i] >= 165.0 && h[i] < 170.0)
	  num[1]++;
	else if(h[i] >= 170.0 && h[i] < 175.0)
	  num[2]++;
	else if(h[i] >= 175.0 && h[i] < 180.0)
	  num[3]++;
	else if(h[i] >= 180.0 && h[i] < 185.0)
	  num[4]++;
	else if(h[i] >= 185.0)
	  num[5]++;
	
  }
	
  for(int i=0;i<=5;++i){
	cout << i+1 << ":";

	for(int j=0;j<num[i];++j)
	  cout << "*";

	cout << endl;
	
  }
  
}

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

int main(){
        
    int n;
    double hist[6]={0};
    double h;
    
    cin >> n;
    for(int i=0; i<n; i++){
        cin >> h;
        if(h<165)hist[0]++;
        else if(h<170)hist[1]++;
        else if(h<175)hist[2]++;
        else if(h<180)hist[3]++;
        else if(h<185)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;
    }
    
    return 0;
}

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

int main(){
	int n;
	double a;
	while(cin >> n && n){
		int count[6] = {};
		for(int i=0;i<n;i++){
			cin >> a;
			if(a>=185.0) count[5]++;
			else if(a>=180.0) count[4]++;
			else if(a>=175.0) count[3]++;
			else if(a>=170.0) count[2]++;
			else if(a>=165.0) count[1]++;
			else count[0]++;
		}
		for(int i=0;i<6;i++){
			cout << i+1 << ':' ;
			if(count[i] != 0){
				for(int j=0;j<count[i];j++){
					cout << '*';
				}
			}
			cout << '\n' ;
		}
	}
	return 0;
}

C++: int main(n,i){int f[9] = {};double a;for(scanf("%d",&n),i=n;scanf("%lf",a),i;--i)a<165?f[1]++:a<170?f[2]++:a<175?f[3]++:a<180?f[4]++:a<185?f[5]++:f[6]++;for(i=1;i<7;puts(""),++i)for(printf("%d:",i),n=0;n<f[i];++n)printf("*");}

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <functional>
#include <vector>
#include <utility>
#include <cstring>
#include <iomanip>
#include <numeric>
#include <cmath>
#include <queue>
#include <map>
using namespace std;
typedef long long ll;
const int INF = 1<<30; 
const int MOD = 1e9 + 7;
const int dy[] = {1, 0, -1, 0};
const int dx[] = {0, 1, 0, -1};
int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n; cin >> n;
    vector<int> cnt(6, 0);
    for(int i = 0; i < n; i++)
    {
        double h; cin >> h;
        if(h >= 185) cnt[5]++;
        else if(h >= 180) cnt[4]++;
        else if(h >= 175) cnt[3]++;
        else if(h >= 170) cnt[2]++;
        else if(h >= 165) cnt[1]++;
        else cnt[0]++;
    }
    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 <bits/stdc++.h>
using namespace std;
int main(){
	int n;
	string rank[6];
	cin>>n;
	while(n--){
		double input;
		cin>>input;
		if(input<165.0)rank[0]+='*';
		else if(165.0<=input&&input<170.0)rank[1]+='*';
		else if(170.0<=input&&input<175.0)rank[2]+='*';
		else if(175.0<=input&&input<180.0)rank[3]+='*';
		else if(180.0<=input&&input<185.0)rank[4]+='*';
		else if(185.0<=input)rank[5]+='*';
	}
	for(int i=0;i<6;i++){
		cout<<i+1<<':'<<rank[i]<<endl;
	}
}

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

using namespace std;

int main()
{
	int  n,i;
	double a;
	string str[8];
	str[0]="1:";
	str[1]="2:";
	str[2]="3:";
	str[3]="4:";
	str[4]="5:";
	str[5]="6:";
	
	cin >> n;
	
	for(i=0;i<n;i++)
	{
		cin >> a;
		if(a<165.0)
		{
			str[0]+="*";
		}
		else if(a>185.0)
		{
			str[5]+="*";
		}
		else
		{
			int aa;
			aa=(a-160.0)/5.0;
			str[aa]+="*";
		}
	}
	for(i=0;i<6;i++)
		cout << str[i] << endl;
}

C++: #include <stdio.h>


int main(void){
    double hi;
    int n;
    int popul[6];
    
    for (int i=0; i<6; i++) popul[i]=0;
    scanf("%d", &n);
    for (int i=0; i<n; i++){
        scanf("%lf", &hi);
        popul[(int)(hi-160)/5]++;
    }
    for (int i=0; i<6; i++){
        printf("%d:", i+1);
        for (int j=0; j<popul[i]; j++){
            printf("*");
        }
        printf("\n");
    }
    return 0;
}

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

using namespace std;

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