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 <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <numeric>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <utility>
#include <sstream>
#include <complex>

using namespace std;

#define FOR(i,a,b) for(long long i=(a);i<(b);i++)
#define REP(i,N) for(long long i=0;i<(N);i++)
#define ALL(s) (s).begin(),(s).end()
#define fi first
#define se second

#define PI acos(-1.0)
#define INF 1000000007

typedef long long ll;
typedef pair<ll, ll> P;
typedef pair<double, double> PD;
typedef pair<string, ll> PS;
typedef vector<ll> V;

double a;
int n;
string ans[6] = { "", "", "", "", "", "" };

int main(){
	cin >> n;
	REP(i, n){
		cin >> a;
		for (int j = 0; j < 6; j++){
			if (a < 165 + 5 * j){
				ans[j] += "*";
				break;
			}
		}
	}
	REP(j, 6)cout << j+1 << ':' << ans[j] << endl;
}

C++: #include<iostream>
using namespace std;
int main(){
	int n;
	int a[6]={0}; 
	cin>>n;
	for(int i=0;i<n;i++){
		double b;
		cin>>b;
		if(165.0>b){
			a[0]++;		
		}
		else if(165.0<=b&&170.0>b){
			a[1]++;
		}
		else if(170.0<=b&&175.0>b){
			a[2]++;		
		}
		else if(175.0<=b&&180.0>b){
			a[3]++;		
		}
		else if(180.0<=b&&185.0>b)
			a[4]++;
		else if(185.0<=b)
			a[5]++;
	}
	for(int i=0;i<6;i++){
		cout<<i+1<<':';
		for(int j=0;j<a[i];j++){
			cout<<'*';
		}
		cout<<endl;	
	}
}

C++: #include <iostream>
#include <stdio.h>
using namespace std;
int main(){
	int n,hist[6]={0};
	double height;
	
	cin>>n;
	for(int i=0;i<n;i++){
		cin>>height;
		if(height<165.0) hist[0]++;
		else if(height>=165.0 && height<170.0) hist[1]++;
		else if(height>=170.0 && height<175.0) hist[2]++;
		else if(height>=175.0 && height<180.0) hist[3]++;
		else if(height>=180.0 && height<185.0) hist[4]++;
		else if(height>=185.0) 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;
	int histgram[8] = {0};
	cin >> n;
	for(int i = 0; i < n; i++) {
		double tmp;
		cin >> tmp;
		if(tmp < 165) histgram[0]++;
		else if(tmp < 170) histgram[1]++;
		else if(tmp < 175) histgram[2]++;
		else if(tmp < 180) histgram[3]++;
		else if(tmp < 185) histgram[4]++;
		else histgram[5]++;
	}
	for(int i = 0; i < 6; i++) {
		cout << i + 1 << ":";
		for(int j = 0; j < histgram[i]; j++)
			cout << "*";
		cout << endl;
	}
}

C++: #include<iostream>
#include<cstring>
#include<algorithm>
#include<vector>
#include<cstdio>
#include<cmath>
#define pb(in,tmp) in.push_back(tmp)
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,b) loop(i,0,b)
#define all(in) in.begin(),in.end()
using namespace std;
int main(){
int n;
int han[6]={0};
int han1[6]={185.0,180.0,175.0,170.0,165.0,0};
cin>>n;
rep(i,n){
double in1;
cin>>in1;
rep(j,6){if(in1>han1[j]){han[5-j]++;break;}}
}
rep(i,6){
//cout<<han[i];
cout<<i+1<<":";
rep(j,han[i])cout<<"*";
cout<<endl;
}
}

C++: #include <iostream>

using namespace std;

int main()
{
    int n, fd[6];
    double h;

    for (int i = 0; i < 6; i++)
        fd[i] = 0;

    cin >> n;
    while (n--) {
        cin >> h;
        if (h >= 185)
            fd[5]++;
        else if (h >= 180)
            fd[4]++;
        else if (h >= 175)
            fd[3]++;
        else if (h >= 170)
            fd[2]++;
        else if (h >= 165)
            fd[1]++;
        else
            fd[0]++;
    }

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

    return 0;
}

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

int main(){

  int n, cnt[6];
  double h, low;

  cin >> n;

  low = 165.0;
  fill(cnt, cnt+6, 0);
  for(int i=0; i<n; i++){
    cin >> h;
    for(int j=0; j<6; j++){
      if(j != 5){
        if(h < low + 5.0 * j){
          cnt[j]++;
          break;
        }
      }
      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 <cstdio>
#include <utility>
using namespace std;

#define gcu getchar_unlocked
int in(int c){int n=0;bool m=false;if(c=='-')m=true,c=gcu();
	do{n=10*n+(c-'0'),c=gcu();}while(c>='0');return m?-n:n;} //&&c<='9'
int in() {return in(gcu());}
bool scan(int &n){int c=gcu();return c==EOF?false:(n=in(c),true);}
bool scan(char &c){c=gcu();gcu();return c!=EOF;}
//bool scan(string &s){int c;s="";
//	for(;;){c=gcu();if(c=='\n'||c==' ')return true;else if(c==EOF)return false;s+=c;}}
template <typename head, typename... tail>
bool scan(head &h, tail&&... t){return scan(h) && scan(t...);}
#define pcu putchar_unlocked
#define vo inline void out
template <typename T>
vo(T n){static char buf[20];char *p=buf;
	if(n<0)pcu('-'),n*=-1;if(!n)*p++='0';else while(n)*p++=n%10+'0',n/=10;
	while (p!=buf)pcu(*--p);}
vo(const char *s){while(*s)pcu(*s++);}
vo(char c){pcu(c);}
//vo(string &s){for (char c: s) pcu(c);}
template <typename head, typename... tail> vo(head&& h, tail&&... t){out(h);out(move(t)...);}
//template <typename T> vo(vector<T> &v){for(T &x:v)out(&x == &v[0]?"":" "),out(x);out('\n');}
#undef vo

int main() {
	int r[6] = {};
	for (int n = in(); n; n--) {
		int h = in(); in();
		int t = h / 5 - 32;
		r[t < 0 ? 0 : t > 5 ? 5 : t]++;
	}
	for (int i = 0; i < 6; i++) {
		out(i + 1, ':');
		for (int j = 0; j < r[i]; j++)
			out('*');
		out('\n');
	}
}

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


using namespace std;

int main(void)
{
	int num;
	cin >> num;

	int p1 = 0, p2 = 0, p3 = 0, p4 = 0, p5 = 0, p6 = 0;
	float tmp;

	for (int i = 0; i < num; i++)
	{
		cin >> tmp;

		if (tmp < 165.0)
			p1++;
		else if (165.0 <= tmp && tmp < 170.0)
			p2++;
		else if (170.0 <= tmp && tmp < 175.0)
			p3++;
		else if (175.0 <= tmp && tmp < 180.0)
			p4++;
		else if (180.0 <= tmp && tmp < 185.0)
			p5++;
		else
			p6++;

	}

	cout << "1:";
	for (int i = 0; i < p1; i++)
		cout << "*";
	cout << endl;

	cout << "2:";
	for (int i = 0; i < p2; i++)
		cout << "*";
	cout << endl;

	cout << "3:";
	for (int i = 0; i < p3; i++)
		cout << "*";
	cout << endl;

	cout << "4:";
	for (int i = 0; i < p4; i++)
		cout << "*";
	cout << endl;

	cout << "5:";
	for (int i = 0; i < p5; i++)
		cout << "*";
	cout << endl;

	cout << "6:";
	for (int i = 0; i < p6; i++)
		cout << "*";
	cout << endl;

}