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<stdio.h>
int main()
{
	int n,i,j;
	double d;
	int a[6] = {0};
	scanf("%d",&n);
	while(n--)
	{
		scanf("%lf",&d);
		if(d<165) a[0]++;
		else if(d>=185) a[5]++;
		else
			a[ ((int)d-165)/5 +1] ++;
	}
	for(i=0;i<6;++i)
	{
		printf("%d:",i+1);
		for(j=0;j<a[i];++j)putchar('*');
		putchar('\n');
	}
	return 0;
}

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

C++: /*
 Input
 1sÚ ¶kÌni®j
 2sÚ 1lÚÌg·iÀF¬æ1ÊÜÅj
 3sÚ 2lÚÌg·iÀF¬æ1ÊÜÅj
 F
 n+1sÚ nlÚÌg·iÀF¬æ1ÊÜÅj
 Output
 1sÚ ©oµu1:vÉÂÃ¢Ä165.0cm¢ÌlªÌ*i¼pj
 2sÚ ©oµu2:vÉÂÃ¢Ä165.0cmÈã`170.0cm¢ÌlªÌ*i¼pj
 3sÚ ©oµu3:vÉÂÃ¢Ä170.0cmÈã`175.0cm¢ÌlªÌ*i¼pj
 4sÚ ©oµu4:vÉÂÃ¢Ä175.0cmÈã`180.0cm¢ÌlªÌ*i¼pj
 5sÚ ©oµu5:vÉÂÃ¢Ä180.0cmÈã`185.0cm¢ÌlªÌ*i¼pj
 6sÚ ©oµu6:vÉÂÃ¢Ä185.0cmÈãÌlªÌ*i¼pj
*/

#include <cstdio>

int main(void)
{
    int number;
    scanf("%d", &number);
    
    int data[6];
    for (int i = 0; i < 6; i++){
        data[i] = 0;
    }
    
    while(number != 0){
        float tmp;
        scanf("%f", &tmp);
        if (tmp < 165.0){
            data[0]++;
        }
        else if (tmp < 170){
            data[1]++;
        }
        else if (tmp < 175){
            data[2]++;
        }
        else if (tmp < 180){
            data[3]++;
        }
        else if (tmp < 185){
            data[4]++;
        }
        else {
            data[5]++;
        }
        number--;
    }
    
    for (int i = 0; i < 6; i++){
        printf("%d:", i + 1);
        while (data[i] != 0){
            printf("*");
            data[i]--;
        }
        printf("\n");
    }
    
    return (0);
}

C++: #define _USE_MATH_DEFINES
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <cfloat>
#include <ctime>
#include <cassert>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
#include <numeric>
#include <list>
#include <iomanip>
#include <iterator>
 
using namespace std;
 
typedef long long ll;
typedef pair<int,int> Pii;
typedef pair<ll,ll> Pll;
 
#define FOR(i,n) for(int i = 0; i < (n); i++)

typedef unsigned long long ull;

int main(){
	int n; cin>>n;
	vector<int> v(6);
	FOR(i,n){
		double d; cin>>d;
		v[min(max((int)(d-160)/5,0),5)]++;
	}
	FOR(i,6){
		printf("%d:",i+1);
		FOR(j,v[i]) putchar('*');
		putchar('\n');
	}

	return 0;
}

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

int main()
{
	int n;
	int m[6] = { 0, 0, 0, 0, 0, 0 };

	cin >> n;

	for (int i = 0; i < n; i++) {
		double h;

		cin >> h;

		if (h < 165)
			m[0]++;
		else if (h >= 165 && h < 170)
			m[1]++;
		else if (h >= 170 && h < 175)
			m[2]++;
		else if (h >= 175 && h < 180)
			m[3]++;
		else if (h >= 180 && h < 185)
			m[4]++;
		else
			m[5]++;
	}

	for (int j = 0; j < 6; j++) {
		cout << j + 1 << ":";

		for (int k = 0; k < m[j]; k++)
			cout << "*";

		cout << endl;
	}

	return 0;
}

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

int main() {
	int n;
	vector<double>v;
	vector<char>a, b, c, d, e, f;
	double ba;
	int ca=0, cb=0, cc=0, cd=0, ce=0, cf=0;
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin>>ba;
		v.push_back(ba);
	}
	sort(v.begin(), v.end());
	for (int i = 0; i < n; i++) {
		if (v[i] < 165) { ca++; }
		else if (v[i] >= 165 && v[i] < 170) { cb++; }
		else if (170 <= v[i] && v[i] < 175) { cc++; }
		else if (175 <= v[i] && v[i] < 180) { cd++; }
		else if (180 <= v[i] && v[i] < 185) { ce++; }
		else { cf++; }
	}
	cout << "1:";
	for (int i = 0; i < ca; i++) {
		a.push_back('*');
		cout << a[i];
	}
	cout << '\n'<<"2:";
	for (int i = 0; i < cb; i++) {
		b.push_back('*');
		cout << b[i];
	}
	cout << '\n' << "3:";
	for (int i = 0; i < cc; i++) {
		c.push_back('*');
		cout << c[i];
	}
	cout << '\n' << "4:";
	for (int i = 0; i < cd; i++) {
		d.push_back('*');
		cout << d[i];
	}
	cout << '\n' << "5:";
	for (int i = 0; i < ce; i++) {
		e.push_back('*');
		cout << e[i];
	}
	cout << '\n' << "6:";
	for (int i = 0; i < cf; i++) {
		f.push_back('*');
		cout << f[i];
	}
	cout << endl;

	return 0;
}

C++: #include <iostream>

using namespace std;

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

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

C++: #include <iostream>

int main()
{
	int freq[6] = {0,0,0,0,0,0};
	int n; std::cin >> n;
	for (int i=0; i<n; i++) {
		float height;
		std::cin >> height;
		if (height < 165.0) freq[0]++;
		else if (height < 170.0) freq[1]++;
		else if (height < 175.0) freq[2]++;
		else if (height < 180.0) freq[3]++;
		else if (height < 185.0) freq[4]++;
		else freq[5]++;
	}
	for (int i=0; i<6; i++) {
		std::cout << i+1 << ":";
		for (int j=0; j<freq[i]; j++) std::cout << "*";
		std::cout << std::endl;
	}
	
	return 0;
}

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

void a(int x);

int main(){
  int n;
  int a1, a2, a3, a4, a5, a6;
  float t[40];

  a1 = a2 = a3 = a4 = a5 = a6 = 0;

  cin >> n;
  for (int i = 0; i < n; i++){
    cin >> t[i];
  }

  for (int i = 0; i < n; i++){
    if (t[i] < 165.0){
      a1++;
    }
    else if (t[i] < 170.0){
      a2++;
    }
    else if (t[i] < 175.0){
      a3++;
    }
    else if (t[i] < 180.0){
      a4++;
    }
    else if (t[i] < 185.0){
      a5++;
    }
    else {
      a6++;
    }
  }

  printf("1:");
  a(a1);

  printf("\n2:");
  a(a2);

  printf("\n3:");
  a(a3);

  printf("\n4:");
  a(a4);

  printf("\n5:");
  a(a5);

  printf("\n6:");
  a(a6);

  printf("\n");
}

void a(int x){
  for (int i = 0; i < x; i++){
    printf("*");
  }
}