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>

using namespace std;

int main(){

  int sum[6], n;
  double in;

  for(int i = 0; i < 6; i++){
    sum[i] = 0;
  }

  cin >> n;

  for(int i = 0; i < n; i++){
    cin >> in;

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

  }

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

  return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int n,i,x,p,j;
	int sin[6];
	float a[41];
	x=0;
	p=0;
	scanf("%d",&n);
	for(i=0;i<=n;i++){
		scanf("%f",&a[i]);
	}
	for(i=0;i<=6;i++){
		sin[i]=0;
	}
	for(i=0;i<=n;i++){
		if(165>a[i]){
			sin[0]++;
		}
		else if(165<=a[i] && a[i]<170){
			sin[1]++;
		}
		else if(170<=a[i] && a[i]<175){
			sin[2]++;
		}
		else if(175<=a[i] && a[i]<180){
			sin[3]++;	
		}
		else if(180<=a[i] && a[i]<185){
			sin[4]++;
		}
		else if(185<=a[i]){
			sin[5]++;
		}
	}
	for(i=0;i<6;i++){
		x++;
		p=sin[i];
		printf("%d:",x);
		if(p!=0){
			for(j=0;j<p;j++){
				printf("*");
			}
		}
		printf("\n");
	}
	return 0;
}

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

int main()
{
	int n;
	double h;
	string cnt[6];

	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 + 1 << ":" << cnt[i] << endl;
	}

	return (0);
}

C++: #include <iostream>
#include <cstring>

using namespace std;

int main(void){
	int n;
	int mi[7];
	memset(mi,0,sizeof(mi));
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		double ii;
		scanf("%lf",&ii);
		if(ii<165)mi[1]++;
		else if(ii<170)mi[2]++;
		else if(ii<175)mi[3]++;
		else if(ii<180)mi[4]++;
		else if(ii<185)mi[5]++;
		else mi[6]++;
	}
	for(int i=1;i<=6;i++){
		printf("%d:",i);
		for(int j=0;j<mi[i];j++)printf("*");
		printf("\n");
	}
    return 0;
}

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

using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

//math
//-------------------------------------------
template<class T> inline T sqr(T x) {return x*x;}

//typedef
//------------------------------------------
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;

//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

//repetition
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI  = acos(-1.0);

//clear memory
#define CLR(a) memset((a), 0 ,sizeof(a))

//debug
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

int main() {
  int n;
  string s[6];
  char c = '*';

  cin >> n;

  REP(i, n) {
    double h;
    cin >> h;
    if(h < 165) s[0] += c;
    else if(165.0 <= h && h < 170.0) s[1] += c;
    else if(170.0 <= h && h < 175.0) s[2] += c;
    else if(175.0 <= h && h < 180.0) s[3] += c;
    else if(180.0 <= h && h < 185.0) s[4] += c;
    else s[5] += c;
  }

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

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 if(185)a[5]++;
			
	}
	
	for(int i=0;i<6;i++){
		cout<<i+1<<":";
			
		for(int j=0;j<a[i];j++)
		cout<<"*";
		cout<<endl;
	}
}

C++: #include<stdio.h>

int main()
{
int n[8]={},N,x,y;


scanf("%d",&N);
for(int i=0;i<N;i++){
scanf("%d.%d",&x,&y);
if(185<=x)n[6]++;
else if(180<=x)n[5]++;
else if(175<=x)n[4]++;
else if(170<=x)n[3]++;
else if(165<=x)n[2]++;
else if(165>x)n[1]++;
}
for(int i=1;i<=7;i++)
{
printf("%d:");
for(int j=0;j<n[i];j++){
printf("*");
}
printf("\n");
}
return 0;
}

C++: #include<iostream>

int n;
int cnt[6];

int main()
{
	std::cin >> n;
	for( int i = 0; i != n; ++i )
	{
		double t;
		std::cin >> t;

		int cls;
		for( cls = 0; cls != 6; ++cls )
		{
			if( !cls && t < 165.0 )
				break;
			else if( t == 5 && t >= 185.0 )
				break;
			else if( t >= 165.0 + ( cls - 1 ) * 5.0 && t < 170.0 + ( cls - 1 ) * 5.0 )
				break;
		}
		++cnt[cls];
	}

	for( int i = 0; i != 6; ++i )
	{
		std::cout << i + 1 << ':';
		for( int j = 0; j != cnt[i]; ++j )
			std::cout << '*';

		std::cout << std::endl;
	}

	return 0;
}

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);
			for(j=1;j<=s[i];j++){
				printf("*");
			}
		printf("\n");
	}
	return 0;
}

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

int main() {
  int n, p;
  double h;
  double a[] = {165.0, 170.0, 175.0, 180.0, 185.0};
  int b[6];
  cin >> n;
  for (int i=0; i<6; i++) b[i] = 0;
  for (int i=0; i<n; i++) {
    cin >> h;
    ++b[distance(a, upper_bound(a, a+5, h))];
  }
  for (int i=0; i<6; i++) {
    cout << i+1 << ":";
    for (int j=0; j<b[i]; j++) {
      cout << "*";
    }
    cout << endl;
  }
}