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

using namespace std;

typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int,int> PII;
typedef long long ll;
typedef unsigned long long ull;

#define REP( i, m, n ) for ( int i = (int)( m ); i < (int)( n ); i++ )
#define UREP( i, m, n ) for ( unsigned int i = (unsigned int)( m ); i < (unsigned int)( n ); i++ )

#define ITER( c ) __typeof( (c).begin() )
#define IREP( c, it ) for ( ITER(c) it = c.begin(); it != c.end(); ++it )
#define ALL( c ) (c).begin(), (c).end()
#define RALL( c ) (c).rbegin(), (c).rend()

#define PB( n ) push_back( n )
#define MP( a, b ) make_pair( ( a ), ( b ) )
#define EXIST( c, e ) ( (c).find( e ) != (c).end() )

#define fst first
#define snd second

#define DUMP( x ) cerr << #x << " = " << ( x ) << endl;
#define DEBUG( x ) cerr << __FILE__ << ":" << __LINE__ << ": " << #x << " = " << ( x ) << endl;

void putStar( int n )
{
	REP( i, 0, n )
	{
		cout << '*';
	}

	return;
}

int main()
{
	VI v( 6 );

	int n;
	cin >> n;

	REP( i, 0, n )
	{
		double in;
		cin >> in;

		if ( in < 165 )
		{
			v[0]++;
		}
		else if ( in < 170 )
		{
			v[1]++;
		}
		else if ( in < 175 )
		{
			v[2]++;
		}
		else if ( in < 180 )
		{
			v[3]++;
		}
		else if ( in < 185 )
		{
			v[4]++;
		}
		else
		{
			v[5]++;
		}
	}

	REP( i, 0, 6 )
	{
		cout << i + 1 << ':';
		putStar( v[i] );
		cout << endl;
	}

	return 0;
}

C++: #define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <string>
#include <math.h>
#include <functional>
#include <algorithm>
#include <utility>

typedef long long Int;
#define REP(i,n) for(int i = 0 ; i < n ; ++i)
#define REPS(a,i,n) for(int i = a ; i < n ; ++i)
using namespace std;

int dosu[6];

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

	REP(i, n){
		double a;
		cin >> a;
		if (a < 165)
			dosu[0]++;
		else if (a < 170)
			dosu[1]++;
		else if (a < 175)
			dosu[2]++;
		else if (a < 180)
			dosu[3]++;
		else if (a < 185)
			dosu[4]++;
		else
			dosu[5]++;
	}

	REPS(1, i, 7){
		cout << i << ":";
		REP(j, dosu[i - 1]){
			cout << "*";
		}
		cout << endl;
	}


	return 0;
}

C++: #include <iostream>
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;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main()
{
	int n;
	cin>>n;
	vector<float> arr;
	for(int i =0;i<n;i++)
	{
		float a;
		cin>>a;
		arr.push_back(a);
	}
	sort(arr.begin(),arr.end());
	unordered_map<int, int> cnt;
	for(int i =0;i<arr.size();i++)
	{
		float check = arr[i];
		if(check < 165.0)
			cnt[1]++;
		else if(check >= 165.0 && check <170.0)
			cnt[2]++;
		else if(check >= 170.0 && check < 175.0)
			cnt[3]++;
		else if(check >= 175.0 && check < 180.0)
			cnt[4]++;
		else if(check >= 180.0 && check < 185.0)
			cnt[5]++;
		else
			cnt[6]++;
	}
	for(int i =1;i<=6;i++)
	{
		cout<<i<<":";
		int size = cnt[i];
		for(int j = 0; j < size;j++)
			cout<<"*";
			
		cout<<endl;
	}
	return 0;
}

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

typedef long long LL;
#define rep(i ,n) for(int i=0;i<n;i++)
#define MOD 1000000007
#define all(v) (v).begin(),(v).end()
#define arycpy(ary1,ary2,N) memcpy(ary2,ary1,sizeof(int)*N) //ary1:???????????? ary2:????????????
typedef vector<int> vi;

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

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

C++: #include <vector>
#include <algorithm>
#include <string>
#include <map>
#include <set>
#include <queue>
#include <cstring>
#include <deque>
#include <cstdio>
#include <cmath>

using namespace std;

#define reep(i,f,t) for(int i=f ; i<int(t) ; ++i)
#define rep(i,n) reep(i, 0, n) 

typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int,int> pii;

int main()
{
	int n;
	scanf("%d", &n);
	
	int hist[6] = {0};
	rep(i, n){
		double h;
		scanf("%lf", &h);
		
		const double harr[] = {165.0, 170.0, 175.0, 180.0, 185.0};
		int term = 0;
		rep(i, 5)
			term += harr[i] <= h;
		hist[term]++;
	}
	
	rep(i, 6){
		printf("%d:", i+1);
		rep(j, hist[i])
			putchar('*');
		puts("");
	}
	
	return 0;
}

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

}

C++: #include<iostream>

using namespace std;

int main(){

  int ninzu,i,j;
  double height;
  int gragh[6]={};


  cin >> ninzu;
  
  for(i=0;i<ninzu;i++){
    cin >> height;
    if(height<165.0)
      gragh[0]++;
    else{
      for(j=0;j<4;j++){
	if(165.0+j*5.0 <= height  &&  height < 170.0+j*5.0){
	  gragh[j+1]++;
	}
      }
    }
    if(height>=185.0)
      gragh[5]++;
  }

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

C++: #include <iostream>
#include <algorithm>
#include <cassert>
#include <cctype>
#include <complex>
#include <cstdio>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;

int n,d[7];
double h;

int main(){
	cin>>n;
	while(cin>>h){
		double l=165.0;
		int m=1;
		while(h>=l&&m<6){l+=5.0;m++;}
		d[m]++;
	}
	for(int i=1;i<7;i++){
		cout<<i<<":";
		for(int j=0;j<d[i];j++)cout<<"*";
		cout<<endl;
	}
}

C++: #include <iostream>

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