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<iomanip>
#include<algorithm>
#include<array>
#include<bitset>
#include<cassert>
#include<cctype>
#include<cmath>
#include<cstdio>
#include<cstring>
#include<functional>
#include<limits>
#include<list>
#include<map>
#include<numeric>
#include<set>
#include<stack>
#include<string>
#include<sstream>
#include<unordered_map>
#include<queue>
#include<vector>
using namespace std;

//#define int long long
using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;

#define rep(i,a,b) for(int i=(a);i<(b);i++)
#define rrep(i,a,b) for(int i=(b)-1;i>=(a);i--)
#define all(a) (a).begin(),(a).end()
#define dump(o) {cerr<<#o<<" "<<o<<endl;}
#define dumpc(o) {cerr<<#o; for(auto &e:(o))cerr<<" "<<e;cerr<<endl;}
#define INF 0x3f3f3f3f
#define INFL 0x3f3f3f3f3f3f3f3fLL
const int MOD = 1e9 + 7;

signed main() {
	int a[6] = {};
	int n; cin >> n;
	rep(i, 0, n) {
		double h; cin >> h;
		rep(j, 0, 6) {
			double b = 165.0 + 5.0*j;
			if (h < b) { a[j]++; break; }
			else if (j == 5) { a[5]++; }
		}
	}
	rep(i, 0, 6) {
		cout << i + 1 << ":";
		rep(j, 0, a[i]) {
			cout << "*";
		}
		cout << endl;
	}
	return 0;
}

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

int d[7];

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

  for(int i = 0; i < n; i++)
  {
    double buf;
    cin >> buf;
    if(buf < 165)
      d[1]++;
    else if(buf < 170)
      d[2]++;
    else if(buf < 175)
      d[3]++;
    else if(buf < 180)
      d[4]++;
    else if(buf < 185)
      d[5]++;
    else
      d[6]++;
  }
  for(int i = 1; i <= 6; i++)
  {
    cout << i << ':';
    for(int j = 0; j < d[i]; j++)
      cout << '*';
    cout << endl;
  }
}

C++: #include<iostream>
using namespace std;
int n, w[7], b;
double a;
int main() {
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> a;
		b = (a - 155.0) / 5;
		if (b < 1) { b = 1; }
		if (b > 6) { b = 6; }
		w[b]++;
	}
	for (int i = 1; i <= 6; i++) {
		cout << i << ':';
		for (int j = 0; j < w[i]; j++) {
			cout << '*';
		}
		cout << endl;
	}
	return 0;
}

C++: # define _CRT_SECURE_NO_WARNINGS 1
# include <iostream>
# include <numeric>
# include <string>
# include <bitset>
# include <vector>
# include <algorithm>
# include <cstdlib>
# include <cstdio>
# include <cstring>
# include <cstdlib>
# include <iomanip>
# include <queue>
# include <sstream>
# include <climits>
# include <cmath>
# include <list>
# include <functional>
# include <string>
# include <ctime>
# include <set>
# include <map>
# include <stack>
using namespace std;
//# define M_PI 3.141592
# define INF ((int)(1<<30))
# define FOR(i,n) for(int i=0;i<(int)n;i++)
# define FORI(i,k,n) for(int i=k;i<(int)n;i++)
# define toRad 2.0*M_PI/360.0
# define inin(x) int x;cin>>x;
# define all(x) x.begin(),x.end()
# define debug(x) cout<<#x<<" :"<<x<<endl;
# define rep(i,n) for(int i=0;i<(int)n;i++)
# define EPS 1e-12
# define CHECK(i,a) FOR(i,a.size())cout<<#a<<"["<<i<<"] : "<<a[i]<<endl; 

class Point
{
public:
	double x, y;

	Point(double x = 0, double y = 0) :x(x), y(y) {}


	Point operator + (Point p) { return Point(x + p.x, y + p.y); }
	Point operator - (Point p) { return Point(x - p.x, y - p.y); }
	Point operator * (double k) { return Point(x * k, y * k); }
	Point operator / (double k) { return Point(x / k, y / k); }
	bool operator < (const Point &p)const { return x != p.x ? x < p.x : y < p.y; }
	bool operator ==(const Point &p)const { return fabs(x - p.x) < EPS&&fabs(y - p.y) < EPS; }

	double abs() { return sqrt(norm()); }
	double norm() { return x*x + y*y; }
};
typedef Point Vector;
struct Segment
{
	Point p1, p2;
};
typedef Segment Line;
class Circle
{
public:
	Point c;
	double r;
	Circle(Point c = Point(), double r = 0.0) :c(c), r(r) {}
};

double dot(Vector a, Vector b) { return a.x*b.x + a.y*b.y; }//??????
double cross(Vector a, Vector b) { return a.x*b.y - a.y*b.x; }//??????
bool isOrthogonal(Vector a, Vector b) { return fabs(dot(a, b)) < EPS; }//??´??????
bool isOrthogonal(Point a1, Point a2, Point b1, Point b2) { return isOrthogonal(a1 - a2, b1 - b2); }
bool isOrthogonal(Line l1, Line l2) { return fabs(dot(l1.p2 - l1.p1, l2.p2 - l2.p1)) < EPS; }
bool isParallel(Vector a, Vector b) { return fabs(cross(a, b)) < EPS; }//?????????
bool isParallel(Point a1, Point a2, Point b1, Point b2) { return isParallel(a1 - a2, b1 - b2); }
bool isParallel(Line l1, Line l2) { return fabs(cross(l1.p2 - l1.p1, l2.p2 - l2.p1)) < EPS; }
Point project(Line s, Point p)
{
	Vector base = s.p2 - s.p1;
	double r = dot(p - s.p1, base) / base.norm();
	return s.p1 + base*r;
}


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

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

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

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

int main()
{
    int n, level[6];
    double d;

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

    cin >> n;

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