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 <vector>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <cstdlib>

using namespace std;

int main(){
	int n;cin>>n;
	int histgram[6];
	memset(histgram,0,sizeof(histgram));
	for(int i = 0; i < n; i++){
		double t;
		cin>>t;
		if(t<165){
			histgram[0]++;
		}
		else if(t>=185){
			histgram[5]++;
		}
		else{
			t-=165;
			histgram[(int)(t/5)+1]++;
		}
	}
	for(int i = 0; i < 6; i++){
		cout<<i+1<<":";
		for(int j = 0; j < histgram[i]; j++){
			cout<<"*";
		}
		cout<<endl;
	}

	return 0;
}

C++: #include <stdio.h>
#include <iostream>
#include <algorithm>
#include <iomanip>
#include <map>
#include <fstream>
#include <sstream>
#include <math.h>
#include <queue>
#include <stack>
#include <math.h>
#include <string.h>


using namespace std;


int main(){
    int n;
    cin>>n;
    string h[6];
    for(int i=0; i<n; i++){
        double hight;
        cin>>hight;
        if(hight<165.0)h[0]+='*';
        else if(hight<170.0)h[1]+='*';
        else if(hight<175.0)h[2]+='*';
        else if(hight<180.0)h[3]+='*';
        else if(hight<185.0)h[4]+='*';
        else h[5]+='*';
        
    }
    
    for(int i=0; i<6; i++){
        cout<<i+1<<":" <<h[i]<<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);
		if(s[i]!=0){
			for(j=1;j<=s[i];j++){
				printf("*");
			}
		}
		printf("\n");
	}
	return 0;
}

C++: #include <iostream>

using namespace std;

void solve()
{
	int n;
	cin >> n;
	int index[6] = {0};
	while(n--)
	{
		double height;
		cin >> height;
		if(height < 165)
		{
			++index[0];
		}
		else if(height < 170)
		{
			++index[1];
		}
		else if(height < 175)
		{
			++index[2];
		}
		else if(height < 180)
		{
			++index[3];
		}
		else if(height < 185)
		{
			++index[4];
		}
		else
		{
			++index[5];
		}
	}
	cout << "1:";
	for(int i = 0; i < index[0]; ++i)
	{
		cout << "*";
	}
	cout << endl;
	cout << "2:";
	for(int i = 0; i < index[1]; ++i)
	{
		cout << "*";
	}
	cout << endl;
	cout << "3:";
	for(int i = 0; i < index[2]; ++i)
	{
		cout << "*";
	}
	cout << endl;
	cout << "4:";
	for(int i = 0; i < index[3]; ++i)
	{
		cout << "*";
	}
	cout << endl;
	cout << "5:";
	for(int i = 0; i < index[4]; ++i)
	{
		cout << "*";
	}
	cout << endl;
	cout << "6:";
	for(int i = 0; i < index[5]; ++i)
	{
		cout << "*";
	}
	cout << endl;
}

int main()
{
	solve();
	return(0);
}

C++: #include <iostream>
#include <string>
#include <cstdio>
using namespace std;
int main(){
	int n,cnt[6]={0};
	float h;
	cin>>n;
	for(int i=0;i<n;i++){
		cin>>h;
		if(h<165.0){
			cnt[0]++;
		}else if(h<170.0){
			cnt[1]++;
		}else if(h<175.0){
			cnt[2]++;
		}else if(h<180.0){
			cnt[3]++;
		}else if(h<185.0){
			cnt[4]++;
		}else{
			cnt[5]++;
		}
	}
	for(int i=0;i<6;i++){
		cout<<i<<":";
		for(int j=0;j<cnt[i];j++){
			cout<<"*";
		}
		cout<<endl;
	}
	return 0;
}

C++: #include <functional>
#include <algorithm>
#include <iostream>
#include <numeric>
#include <iomanip>
#include <utility>
#include <cstdlib>
#include <sstream>
#include <bitset>
#include <vector>
#include <cstdio>
#include <ctime>
#include <queue>
#include <deque>
#include <cmath>
#include <stack>
#include <list>
#include <map>
#include <set>

using namespace std;

typedef vector<int> VI;
typedef pair<int,int> PII;
typedef long long ll;

#define dump(x)  cerr << #x << " = " << (x) << endl
#define rep(i,n) for(int i=0;i<(n);i++)
#define ALL(a)  (a).begin(),(a).end()
#define PB push_back
#define sz size()

const double EPS = 1e-10;
const int INF = 100000000;

int main(){
    int data[10]={};
    int n;
    cin>>n;
    rep(i,n){
        double s;
        cin>>s;
        if(s>=185.0)data[6]++;
        else if(s>=180.0)data[5]++;
        else if(s>=175.0)data[4]++;
        else if(s>=170.0)data[3]++;
        else if(s>=165.0)data[2]++;
        
        else data[1]++;
    }

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

C++: #include <iostream>
using namespace std;
int main(){
	const double B[]={165.0,170.0,175.0,180.0,185.0};
	int n;
	int count[6]={0};
	cin>>n;
	for(int i=0;i<n;++i){
		double height;
		cin>>height;
		if(height>=B[4])count[5]++;
		else for(int j=0;j<5;++j){
			if(height<B[j]){
				count[j]++;
				break;
			}
		}
	}
	for(int i=0;i<6;++i){
		cout<<i+1<<":";
		for(int j=0;j<count[i];++j)cout<<"*";
		cout<<"\n";
	}
}

C++: #include <cstdio>
int main()
{
    int n, h, t, a[6];
    scanf("%d", &n);
    for (int i = 0; i < 6; ++i) a[i] = 0;
    for (int i = 0; i < n; ++i) {
        scanf("%d.%d", &h, &t);
        h = 10*h + t;
        if (h < 1650) a[0]++;
        else if (h < 1700) a[1]++;
        else if (h < 1750) a[2]++;
        else if (h < 1800) a[3]++;
        else if (h < 1850) a[4]++;
        else a[5]++;
    }
    for (int i = 0; i < 6; ++i) {
        printf("%d:", i+1);
        for (int j = 0; j < a[i]; ++j) putchar('*');
        puts("");
    }
    return 0;
}

C++: #include <iostream>

using namespace std;

int n = 1;

void print( int a ){
  cout << n << ":";
    for( int i = 0 ; i < a ; i++ ) cout << "*";
    cout << endl;
    n++;
}

int main(void){

  int n;
  double s[40];
  int a[6] = {0};

  cin >> n;
    for( int i = 0 ; i < n ; i++ ){
      cin >> s[i];
      if( s[i] < 165 ) a[0]++;
      else if( 165 <=s[i] && s[i] < 170 ) a[1]++;
      else if( 170 <= s[i] && s[i] < 175 )a[2]++;
      else if( 175 <= s[i] && s[i] < 180 ) a[3]++;
      else if( 180 <= s[i] && s[i] < 185 ) a[4]++;
      else a[5]++;
    } 
    for( int i = 0 ; i < 6 ; i++ ){
      print(a[i]);
    }
  return 0;
}

C++: main(){int n,if[9] = {};double a;for(scanf("%d",&n),i=n;scanf("%lf",a),i;--i)a<165?f[1]++:a<170?f[2]++:a<175?f[3]++:a<180?f[4]++:a<185?f[5]++:f[6]++;for(i=1;i<7;puts(""),++i)for(printf("%d:",i),n=0;n<f[i];++n)printf("*");}

C++: #include<iostream>
#include<cstdio>
#include<string>
#include<vector>
#include<algorithm>
using namespace std;
typedef long long int ll;

int main()
{
    int n;
	double a;
	int ans[6]={0,0,0,0,0,0};
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		cin >> a;
		for(int j=0;j<5;j++){
			if(a<165+5*j){
				ans[j]++;
				break;
			}
		}
		if(a>=185)ans[5]++;
	}
	for(int i=0;i<6;i++){
		printf("%d:",i+1);
		for(int j=0;j<ans[i];j++){
			printf("*");
		}
		printf("\n");
	}
    return 0;
}