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++: import java.util.Arrays;
import java.util.Scanner;

public class Main
{
	public static void main(String arg[])
	{
		try{
			Scanner sc = new Scanner(System.in);
			int n=sc.nextInt();
			double a[] = new double[n];
			int b[] = new int[7];
			Arrays.fill(b, 0);

			for(int i=0; i<n; i++)
				a[i]=sc.nextDouble();
			for(int i=0; i<n; i++)
			{
				if(a[i]<165.0)
					b[1]++;
				if(165.0<=a[i]&& a[i]<170.0)
					b[2]++;
				if(170.0<=a[i]&&a[i]<175.0)
					b[3]++;
				if(175.0<=a[i]&&a[i]<180.0)
					b[4]++;
				if(180.0<=a[i]&&a[i]<185.0)
					b[5]++;
				if(a[i]>=185.0)
					b[6]++;
			}
			for(int i=1; i<=6; i++)
			{
				System.out.print(i+":");
				for(int j=0; j<b[i]; j++)
					System.out.print("*");
				System.out.println();
			}
		}catch(Exception e){}
	}
}

C++: #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <queue>
#include <stack>
#include <vector>
#include <algorithm>
#include <string>
#include <cstring>
#include <cmath>
#include <complex>
#include <map>
#include <climits>
#include <sstream>
using namespace std;

#define reep(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n) reep((i),0,(n))
#define ALL(v) (v).begin(),(v).end()
#define PB push_back
#define EPS 1e-8
#define F first
#define S second
#define mkp make_pair

static const double PI=6*asin(0.5);
typedef long long ll;
typedef complex<double> CP;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef vector<int> vint;
static const int INF=1<<24;

template <class T>
void initvv(vector<vector<T> > &v,int a,int b, const T  &t = T()){
	v.assign(a,vector<T>(b,t));
}

//v.erase(unique(v.begin(),v.end()),v.end());


int main(){
	int n;
	cin>>n;
	vint ans(6,0);
	rep(i,n){
		double t;
		cin>>t;
		if(t>=185.0){
			ans[5]++;
		}
		else{
			rep(j,5){
				if(t<165.0+5.0*j){
					ans[j]++;
					break;
				}
			}
		}

	}
	rep(i,6){
		cout<<i+1<<":";
		rep(j,ans[i]){
			cout<<"*";
		}
		cout<<endl;
	}
}

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

string rep(string s, int n) {
    string ret = "";
    for (int i=0; i<n; ++i) {
        ret += s;
    }
    return ret;
}

int main() {
    vector<int> dis(6, 0);
    int n;
    cin >> n;
    double h;
    for (int i=0; i<n; ++i) {
        cin >> h;
        if (h < 165) {
            dis[0] ++;
        } else if (h < 170) {
            dis[1] ++;
        } else if (h < 175) {
            dis[2] ++;
        } else if (h < 180) {
            dis[3] ++;
        } else if (h < 185) {
            dis[4] ++;
        } else {
            dis[5] ++;
        }
    }
    for (int i=0; i<(int)dis.size(); ++i) {
        cout << (i+1) << ":" << rep("*", dis[i]) << endl;
    }
    return 0;
}

C++: #include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
using namespace std;

int main()
{
    int tall[] = {165, 170, 175, 180, 185};
    int n;
    cin >> n;

    vector<int> num(6);
    while(--n >= 0){
        int a, b;
        char c;
        cin >> a >> c >> b;

        int i = upper_bound(tall, tall+5, a) - tall;
        ++ num[i];
    }

    for(int i=0; i<6; ++i)
        cout << (i+1) << ':' << string(num[i], '*') << endl;

    return 0;
}

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 <stdio.h>
int n, p[6]; double d;
int main() {
	scanf("%d", &n);
	for(int i = 0; i < n; i++) {
		scanf("%lf", &d);
		if(d < 165.0) {
			p[0]++;
		}
		else if(d < 170.0) {
			p[1]++;
		}
		else if(d < 175.0) {
			p[2]++;
		}
		else if(d < 180.0) {
			p[3]++;
		}
		else if(d < 185.0) {
			p[4]++;
		}
		else {
			p[5]++;
		}
	}
	for(int i = 0; i < 6; i++) {
		printf("%d:", i + 1);
		for(int j = 0; j < p[i]; j++) {
			printf("*");
		}
		printf("\n");
	}
	return 0;
}

C++: #include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <complex>
#include <string>
#include <sstream>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <functional>
#include <iostream>
#include <map>
#include <set>
using namespace std;
typedef pair<int,int> P;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
#define pu push
#define pb push_back
#define mp make_pair
#define eps 1e-9
#define INF 2000000000
#define sz(x) ((int)(x).size())
#define fi first
#define sec second
#define SORT(x) sort((x).begin(),(x).end())
#define all(x) (x).begin(),(x).end()
#define EQ(a,b) (abs((a)-(b))<EPS)
int main()
{
	int n;
	cin >> n;
	int ans[7]={0};
	for(int i=0;i<n;i++)
	{
		double k;
		cin >> k;
		if(k<165.0)ans[0]++;
		else if(k<170.0)ans[1]++;
		else if(k<175.0)ans[2]++;
		else if(k<180.0)ans[3]++;
		else if(k<185.0)ans[4]++;
		else ans[5]++;
	}
	for(int i=0;i<6;i++)
	{
		printf("%d:",i+1);
		for(int j=0;j<ans[i];j++)cout << '*';
		cout << endl;
	}
	return 0;
}

C++: //include
//------------------------------------------
#include <bits/stdc++.h> // only for GCC

using namespace std;

//typedef
//------------------------------------------
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef vector<bool> vb;
typedef vector<vb> vvb;
typedef pair<int, int> pii;
typedef long long ll;
typedef unsigned long long ull;

//container util
//------------------------------------------
#define all(a)  (a).begin(),(a).end()
#define rall(a) (a).rbegin(), (a).rend()
#define pb push_back
#define mp make_pair

//repetition
//------------------------------------------
#define loop(i,a,b) for(ull i=(a);i<ull(b);++i)
#define rep(i,n) loop(i,0,n)
#define iter(i,c) for(auto i=(c).begin(); i!=(c).end(); ++i)
#define riter(i,c) for(auto i=(c).rbegin(); i!=(c).rend(); ++i)

//constant
//--------------------------------------------
const double eps = 1e-10;
const double pi  = acos(-1.0);
const double inf = (int)1e8;

// output vector
// ------------------------------------------
namespace std {
    template<typename T>ostream&operator<<(ostream&os, vector<T>const&v){
        iter(it,v) os<<*it<<(it+1==v.end()?"":",");
        return os;
    }
    template<typename T, typename U>ostream&operator<<(ostream&os,const pair<T,U>&p){
        return os << "[" << p.dirst << "," << p.second << "]";
    }
}

//clear memory
// ------------------------------------------
#define clr(a,i) memset((a), (i) ,sizeof(a))

int main(){
   int n;
   double a;
   cin >> n;
   
   vi s(n);
   
   rep(i,n){
      cin >> a;
      if(a<165) s[0]++;
      else if(a<170) s[1]++;
      else if(a<175) s[2]++;
      else if(a<180) s[3]++;
      else if(a<185) s[4]++;
      else s[5]++;
   }
   rep(i,6){
      cout << i+1 << ":";
      rep(j,s[i]) cout << "*"; cout << endl;
   }
}