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++: 
#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <memory>
#include <string>

#include <algorithm>
#include <complex>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <vector>
#include <bitset>

using namespace std;

#ifdef _MSC_VER
#define __typeof__ decltype
#define strtok_r strtok_s
#endif

#define ITER(c)             __typeof__((c).begin())
#define FOREACH(it, c)      for (ITER(c) it=(c).begin(); it != (c).end(); ++it)
#define RITER(c)            __typeof__((c).rbegin())
#define RFOREACH(it, c)     for (RITER(c) it=(c).rbegin(); it != (c).rend(); ++it)
#define REP(i, n)           REPEAT(i, 0, n)
#define RREP(i, n)          RREPEAT(i, 0, n)
#define REPEAT(i, k, n)     for(int i = (k); i < (k+n); ++i)
#define RREPEAT(i, k, n)    for(int i = (k)+(n)-1; i >= (k); --i)
#define FROMTO(i,f,t)       for(int i = f; i < t; i++)
#define ALL(c)              (c).begin(), (c).end()
#define LLPOW(p1,p2)        ((ll)pow((double)(p1), (int)p2))
#define ESIZEOF(A)          (sizeof(A)/sizeof((A)[0]))
#define CIN_NO_SYNC         do { cin.tie(0); ios_base::sync_with_stdio(false); } while(0)
#define GETSTR(p)           fgets((p), sizeof(p), stdin)
#define CHOMP(p)            do{ char *_q = (p) + strlen(p)-1; if(*_q == '\n' || *_q == '\r') *_q = 0; } while(0)
#define FILL(m,v)           memset(m, v, sizeof(m))
#define mp                  make_pair
#define pb                  push_back
template<class _T> _T MAX(_T p1,_T p2){return (p1>p2)?p1:p2;} 
template<class _T> _T MIN(_T p1,_T p2){return (p1<p2)?p1:p2;} 
template <class _Tv> inline string join(_Tv &v,string sep=" "){
    ostringstream s;FOREACH(it,v){if(it!=v.begin())s<<sep;s<<*it;};return s.str();
}

typedef long long ll;
typedef unsigned long long ull;
typedef double D;
typedef complex<D> P;
#define X real()
#define Y imag()
#define EPS (1e-9)
#define DEQ(p1,p2) (abs((p1)-(p2)) < EPS)

#ifdef _DEBUG
template<class _Tv> inline void _prfe(const char *_n,_Tv _c,bool _p=false){
    ITER(_c) _it=_c.begin();
    if(_p){cout<<_n<<" = ["<<endl;for(;_it!=_c.end();++_it)cout<<"    "<<*_it<<endl;cout<<"]"<<endl; }
    else{cout<<_n<<" = [ "<<*_it++;for(;_it!=_c.end();++_it)cout<<", "<<*_it;cout<<" ]"<<endl; }
}
#define pf printf
#define pr(n) do{cout<<#n" = "<<(n)<<endl;}while(0)
#define prfe(n) _prfe(#n, n)
#define prfep(n) _prfe(#n, n, true)
#define dbgchk(n) do{if(n)throw;}while(0)
#else
#define pf(...) /* */
#define pr(...) /* */
#define prfe(...) /* */
#define prfep(...) /* */
#define dbgchk(...) /* */
#endif

int num[6];

int main(){
    int n;
    cin >> n;
    double h;
    while(cin >> h){
        int i = (int)((h-160.0)/5.0);
        if(i < 0) i = 0;
        if(i > 5) i = 5;
        num[i]++;
    }
    REP(i,6){
        cout << i+1 << ":";
        REP(j,num[i]) cout << "*";
        cout << endl;
    }
    return 0;
}

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

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

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

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

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

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

int main() {
	int n; int rank[6] = { 0,0,0,0,0,0 };
	double tmp;
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> tmp;
		if (tmp < 165.)rank[0]++;
		else if (tmp >= 165.&&tmp < 170.)rank[1]++;
		else if (tmp >= 170.&&tmp < 175.)rank[2]++;
		else if (tmp >= 175.&&tmp < 180.)rank[3]++;
		else if (tmp >= 180.&&tmp < 185.)rank[4]++;
		else if (tmp >= 185.)rank[5]++;
	}

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

C++: #include<stdio.h>
int main(void)
{
	int a,s[6],f,i,j,z;
	float d;
	scanf("%d",&a);
	for(i=1;i<=6;i++){
		s[i]=0;
	}
	for(i=1;i<=a;i++){
		scanf("%f",&d);
		if(d<165.0){
			s[1]++;
		}
		else if(d>=165.0&&d<170.0){
			s[2]++;
		}
		else if(d>=170.0&&d<175.0){
			s[3]++;
		}
		else if(d>=175.0&&d<180.0){
			s[4]++;
		}
		else if(d>=180.0&&d<185.0){
			s[5]++;
		}
		else if(d>=185.0){
			s[6]++;
		}
	}
	for(i=1;i<=6;i++){
		printf("%d:",i);
			for(j=1;j<=s[i];j++){
				printf("*");
			}
		printf("\n");
	}
	return 0;
}

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

C++: #include "bits/stdc++.h"
using namespace std;

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

	for (int i = 0; i < n; i++) {
		cin >> temp;

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

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

	return 0;
}