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>

using namespace std;

int main(){
	 
	int n;
	
	while( cin >> n ) {
		
	if( n == 0) {
		cout << "0\n";
		break;
	}
	
	double cm;
	string a1 = "" ;
	string a2 = "" ;
	string a3 = "" ;
	string a4 = "" ;
	string a5 = "" ;
	string a6 = "" ;
	
	while(n--) {
		
		cin >> cm;
		
		if( cm < 165.0 )
		a1 += "*";
		
		if( 165.0 <= cm && cm < 170.0 )
		a2 += "*";
		
		if( 170.0 <= cm && cm < 175.0 )
		a3 += "*";
		
		if( 175.0 <= cm && cm < 180.0 )
		a4 += "*";
		
		if( 180.0 <= cm && cm < 185.0 )
		a5 += "*";
		
		if(  cm > 185 )
		a6 += "*";
		
	}
	cout << "1:" << a1 << "\n";
	cout << "2:" << a2 << "\n";
	cout << "3:" << a3 << "\n";
	cout << "4:" << a4 << "\n";
	cout << "5:" << a5 << "\n";
	cout << "6:" << a6 << "\n";
}
  	return 0;
}

C++: #include<stdio.h>
int main()
{
double N;
int num[41]={},A,B=0;

scanf("%d",&A);
for(int i=0;i<A;i++)
{
scanf("lf",&N);
B=N*10;
if((int)N<165)num[0]++;
else if((int)N>=1650&&(int)N<1700)num[1]++;
else if((int)N>=1700&&(int)N<1750)num[2]++;
else if((int)N>=1750&&(int)N<1800)num[3]++;
else if((int)N>=1800&&(int)N<1850)num[4]++;
else if((int)N>=1850)num[5]++;
else if((int)N>=1650&&(int)N<165)num[6]++;
}
for(int i=0;i<6;i++)
{printf("%d:);
for(int j=0;j<num[i];j++)
printf("*");
}
printf("\n");

return 0;
}

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

int main ()
{
    int n;
    cin >> n;
    double a[5] = {165.0, 170.0, 175.0, 180.0, 185.0};
    string res[6];

    for (int i = 0; i < n; i++) {
        double num;
        cin >> num;
        for (int j = 0; j < 6; j++) {
            if (j < 5 && a[j] > num) {
                res[j] += '*';
                break;
            }  else if(j == 5) {
                res[5] += '*';
            }
        }
    }

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

    return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
	int n;
	double a[1024];
	int r[6]={0};
	cin>>n;
	for(int i=0;i<n;i++){
		cin>>a[i];
		if(a[i]<165)r[0]++;
		else if(a[i]<170)r[1]++;
		else if(a[i]<175)r[2]++;
		else if(a[i]<180)r[3]++;
		else if(a[i]<185)r[4]++;
		else r[5]++;
		}
	
	for(int i=0;i<6;i++){
		cout<<i+1<<':';
		for(int j=0;j<r[i];j++)cout<<'*';
		cout<<endl;
		}
		}

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

int p[7];

int main(){
	int num;
	float height;
	for(int i=0; i < 8; i++) p[i] = 0;

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

		if(height < 165.0) p[1]++;
		else if(height < 170.0) p[2]++;
		else if(height < 175.0) p[3]++;
		else if(height < 180.0) p[4]++;
		else if(height < 180.5) p[5]++;
		else p[6]++;
	}
	for(int i=1; i <= 6; i++){
		cout << i << ":";
		for(int j=0; j < p[i]; j++){
			cout << "*";
		}
		cout << endl;
	}
}

C++: #include <iostream>
#include <algorithm>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <numeric>
#include <bitset>
#include <cmath>

static const int MOD = 1000000007;
using ll = long long;
using u32 = unsigned;
using u64 = unsigned long long;
using namespace std;

template<class T> constexpr T INF = ::numeric_limits<T>::max()/32*15+208;

int main() {
    int n;
    cin >> n;
    vector<int> cnt(6);
    vector<double> a{165, 170, 175, 180, 185, 9999};
    for (int i = 0; i < n; ++i) {
        double x;
        cin >> x;
        for (int j = 0; j < 6; ++j) {
            if(x < a[j]){
                cnt[j]++;
                break;
            }
        }
    }
    for (int i = 0; i < 6; ++i) {
        cout << i+1 << ":" << string(cnt[i], '*') << "\n";
    }
    return 0;
}

C++: #include<iostream>
using namespace std;
int n;
double t[6]={165.0,170.0,175.0,180.0,185.0,9999999.9};
int cnt[6];
double in;
int main(){
  for(int i=0;i<6;i++)cnt[i]=0;
  cin>>n;
  for(int i=0;i<n;i++){
    cin>>in;
    for(int j=0;j<6;j++){
      if(in<t[j]){cnt[j]++;break;}
    }
  }
  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 <vector>
#include <list>
#include <map>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <queue>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <fstream>
#include <cstdio>
#include <climits>
#include <complex>
#include <cstdint>
#include <tuple>

#define M_PI       3.14159265358979323846

using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) { int v; istringstream sin(s); sin >> v; return v; }
template<class T> inline string toString(T x) { ostringstream sout; sout << x; return sout.str(); }
inline int readInt() { int x; scanf("%d", &x); return x; }

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef pair<int, PII> TIII;
typedef long long LL;
typedef unsigned long long ULL;
typedef vector<LL> VLL;
typedef vector<VLL> VVLL;

//container util

//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define SQ(a) ((a)*(a))
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

//repetition
//------------------------------------------
#define FOR(i,s,n) for(int i=s;i<(int)n;++i)
#define REP(i,n) FOR(i,0,n)
#define MOD 1000000007

#define rep(i, a, b) for(int i = a; i < (b); ++i)
#define trav(a, x) for(auto& a : x)
#define all(x) x.begin(), x.end()
#define sz(x) (int)(x).size()


struct Edge {
    int to, cost, nm;
    Edge(int to, int cost, int nm): to(to), cost(cost), nm(nm) {}
};

typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<vector<Edge>> AdjList;
AdjList graph;
#define chmin(x,y) x=min(x,y)
#define chmax(x,y) x=max(x,y)
const int INF = 100000000;

ll GCD(ll a, ll b){
    if(a < b) swap(a, b);
    if(b == 0) return a;
    return GCD(b, a%b);
}

bool cmp(const pii& a, const pii& b){
    if(a.first == b.first){
        return a.second < b.second;
    }
    return a.first < b.first;
}

int arr[6];
int main() {

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

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